Class SequentialActorIdFactory

java.lang.Object
net.sodacan.core.actor.SequentialActorIdFactory
All Implemented Interfaces:
ActorIdFactory

public class SequentialActorIdFactory extends Object implements ActorIdFactory
Create a sequential ActorId for testing. The counter used in this Factory would have to be persisted in order to be useful in production. Also, the number is incremented in the ActorGroup of the actor creating the actorId so it is very likely that there would be an id collision if two actors, each in a different actorGroup, created an id was sent to the same ActorGroup. UUID is much safer but about three times slower than this class.
  • Constructor Details

    • SequentialActorIdFactory

      public SequentialActorIdFactory(Config config)
  • Method Details