Package io.dapr.actors
Class ActorId
java.lang.Object
io.dapr.actors.ActorId
- All Implemented Interfaces:
Comparable<ActorId>
The ActorId represents the identity of an actor within an actor service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this instance with a specified {link #ActorId} object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified actorId.static ActorIdCreates a new ActorId with a random id.booleanChecks if this instance is equals to the other instance.inthashCode()Calculates the hash code for this ActorId.toString()Returns the String representation of this Actor's identifier.
-
Constructor Details
-
ActorId
Initializes a new instance of the ActorId class with the id passed in.- Parameters:
id- Value for actor id
-
-
Method Details
-
toString
Returns the String representation of this Actor's identifier. -
compareTo
Compares this instance with a specified {link #ActorId} object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified actorId. The comparison is done based on the id if both the instances.- Specified by:
compareToin interfaceComparable<ActorId>- Parameters:
other- The actorId to compare with this instance.- Returns:
- A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the other parameter.
-
hashCode
public int hashCode()Calculates the hash code for this ActorId. -
equals
Checks if this instance is equals to the other instance. -
createRandom
Creates a new ActorId with a random id.- Returns:
- A new ActorId with a random id.
-