Search in sources :

Example 1 with HubPattern

use of actor4j.core.utils.HubPattern in project actor4j-core by relvaner.

the class PrimaryActor method preStart.

@Override
public void preStart() {
    List<UUID> ids = null;
    if (secondary != null)
        // creating secondary actors
        ids = addChild(secondary.apply(self()), instances);
    else
        ids = new LinkedList<>();
    ActorGroupSet secondaryGroup = new ActorGroupSet(ids);
    hub = new HubPattern(this, secondaryGroup);
    ids.add(self());
    // registering alias
    getSystem().setAlias(ids, alias);
}
Also used : HubPattern(actor4j.core.utils.HubPattern) ActorGroupSet(actor4j.core.utils.ActorGroupSet) UUID(java.util.UUID) LinkedList(java.util.LinkedList)

Aggregations

ActorGroupSet (actor4j.core.utils.ActorGroupSet)1 HubPattern (actor4j.core.utils.HubPattern)1 LinkedList (java.util.LinkedList)1 UUID (java.util.UUID)1