ActorId 类
定义
ActorId represents identity of an actor within an actor service. The actors can be identified by java.lang.String, java.util.UUID or long.
public class ActorId
- 继承
-
java.lang.ObjectComparable<ActorId>ActorId
构造函数
ActorId(long id) |
Initializes a new instance of ActorId class with Id value of type long |
ActorId(String id) |
Initializes a new instance of ActorId class with Id value of type java.lang.String. |
ActorId(UUID id) |
Initializes a new instance of ActorId class with Id value of type java.util.UUID |
方法
compareTo(ActorId o) |
Compares this instance with a specified ActorId object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified actorId.
Remarks:The comparison is done based on the id if both the instances have same ActorIdKind. If ActorIdKind is different, then comparison is done based on string representation of the actor id. |
equals(Object obj) |
Determines whether this instance and a specified object, which must also be a ActorId object, have the same value. |
getKind() |
Gets the ActorIdKind for the ActorId. |
getLongId() |
Gets id for ActorId whose ActorIdKind is Long. |
getPartitionKey() |
Gets partition key for the ActorId.
Remarks:
|
getStringId() |
Gets id for ActorId whose ActorIdKind is String. |
getUUIDId() |
Gets id for ActorId whose ActorIdKind is UUID. |
hashCode() | |
newId() |
creates a random actor Id. |
toString() |