Class ActorId

java.lang.Object
net.sodacan.core.ActorId

public final class ActorId extends Object

An actorId is made up of a type, an actorGroup, and a unique id for the instance of the actor. Once created, the actorId is immutable and final.

An actorfactory is able to create an actor instance given the actor id and a registry (map) of actor type to actor subclass.

The two components are separated by a "|", vertical bar.
  • Constructor Details

    • ActorId

      public ActorId()
    • ActorId

      public ActorId(String type, int actorGroup, String id)
    • ActorId

      public ActorId(String type, int actorGroup, Long id)
    • ActorId

      public ActorId(String type, int actorGroup, UUID id)
  • Method Details

    • create

      public static ActorId create(String type, int actorGroup, String id)
    • create

      public static ActorId create(Class<?> clazz, int actorGroup, String id)
    • createFromString

      public static ActorId createFromString(String actorIdString)
    • getType

      public String getType()
    • getId

      public String getId()
    • getActorGroup

      public int getActorGroup()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object