Package net.sodacan.core.actor
Class SequentialActorIdFactory
java.lang.Object
net.sodacan.core.actor.SequentialActorIdFactory
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
SequentialActorIdFactory
-
-
Method Details
-
create
- Specified by:
create
in interfaceActorIdFactory
-