| Modifier and Type | Class and Description |
|---|---|
protected static class |
Stage.ActorProtocolActor<T>
Internal type used to manage Actor proxy creation.
|
| Modifier and Type | Field and Description |
|---|---|
protected io.vlingo.xoom.actors.Directory |
directory |
protected World |
world |
| Constructor and Description |
|---|
Stage(World world,
AddressFactory addressFactory,
String name)
Initializes the new
Stage of theworld, addressFactory, and with name. |
Stage(World world,
AddressFactory addressFactory,
String name,
int directoryBuckets,
int directoryInitialCapacity)
Initializes the new
Stage of theworld, addressFactory, name,
and Directory capacity of directoryBuckets and directoryInitialCapacity. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
actorAs(Actor actor,
Class<T> protocol)
Answers the
T protocol type as the means to message the backing Actor. |
Protocols |
actorFor(Class<?>[] protocols,
Class<? extends Actor> type,
Object... parameters)
Answers a
Protocols that provides one or more supported protocols for the
newly created Actor according to definition. |
Protocols |
actorFor(Class<?>[] protocols,
Definition definition)
Answers a
Protocols that provides one or more supported protocols for the
newly created Actor according to definition. |
Protocols |
actorFor(Class<?>[] protocols,
Definition definition,
Actor parent,
Supervisor maybeSupervisor,
Logger logger)
Answers a
Protocols that provides one or more supported protocols for the
newly created Actor according to definition. |
<T,A extends Actor> |
actorFor(Class<T> protocol,
Class<? extends Actor> type,
ActorInstantiator<A> instantiator)
Answers the
T protocol of the newly created Actor that implements the protocol. |
<T> T |
actorFor(Class<T> protocol,
Class<? extends Actor> type,
Object... parameters)
Answers the
T protocol of the newly created Actor that implements the protocol. |
<T> T |
actorFor(Class<T> protocol,
Definition definition)
Answers the
T protocol of the newly created Actor that implements the protocol. |
protected <T> T |
actorFor(Class<T> protocol,
Definition definition,
Actor parent,
Supervisor maybeSupervisor,
Logger logger)
Answers the T protocol for the newly created Actor instance.
|
<T> T |
actorFor(Class<T> protocol,
Definition definition,
Address address)
Answers the
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific address. |
<T> T |
actorFor(Class<T> protocol,
Definition definition,
Address address,
Logger logger)
Answers the
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific address and logger. |
<T> T |
actorFor(Class<T> protocol,
Definition definition,
Logger logger)
Answers the
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific logger. |
<T> io.vlingo.xoom.common.Completes<T> |
actorOf(Class<T> protocol,
Address address)
Answers the
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or null if not found. |
<T,A extends Actor> |
actorOf(Class<T> protocol,
Address address,
Class<? extends Actor> type,
ActorInstantiator<A> instantiator)
Answers the
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or the {#code T} instance of
the new Actor created for type by the instantiator. |
<T> io.vlingo.xoom.common.Completes<T> |
actorOf(Class<T> protocol,
Address address,
Class<? extends Actor> type,
Object... parameters)
Answers the
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or the T instance of
the new Actor created for type with the parameters. |
<T> io.vlingo.xoom.common.Completes<T> |
actorOf(Class<T> protocol,
Address address,
Definition definition)
Answers the
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or a new Actor instance
of the type and definition. |
protected Stage.ActorProtocolActor<Object>[] |
actorProtocolFor(Class<?>[] protocols,
Definition definition,
Actor parent,
Address maybeAddress,
Mailbox maybeMailbox,
Supervisor maybeSupervisor,
Logger logger)
Answers the ActorProtocolActor[] for the newly created Actor instance.
|
protected Stage.ActorProtocolActor<Object>[] |
actorProtocolFor(Class<?>[] protocols,
Definition definition,
Actor parent,
Supervisor maybeSupervisor,
Logger logger)
Answers the ActorProtocolActor[] for the newly created Actor instance.
|
protected <T> Stage.ActorProtocolActor<T> |
actorProtocolFor(Class<T> protocol,
Definition definition,
Actor parent,
Address maybeAddress,
Mailbox maybeMailbox,
Supervisor maybeSupervisor,
Logger logger)
Answers the ActorProtocolActor for the newly created Actor instance.
|
protected <T> T |
actorThunkFor(Class<T> protocol,
Definition definition,
Address address) |
AddressFactory |
addressFactory()
Answer my
addressFactory. |
protected Address |
allocateAddress(Definition definition,
Address maybeAddress)
Answers an Address for an Actor.
|
protected Mailbox |
allocateMailbox(Definition definition,
Address address,
Mailbox maybeMailbox)
Answers a Mailbox for an Actor.
|
void |
conclude()
Concludes the receiver, eventually causing
it to receive a stop() message.
|
int |
count()
Answers the
int count of the number of Actor instances contained in this Stage. |
protected io.vlingo.xoom.actors.Directory |
directory()
Answers my Directory instance.
|
void |
dump()
A debugging tool used to print information about the
Actor instances contained in this Stage. |
protected void |
extenderStartDirectoryScanner() |
boolean |
isStopped()
Answers whether or not this
Stage has been stopped or is in the process of stopping. |
protected ActorFactory.MailboxWrapper |
mailboxWrapper() |
<T> io.vlingo.xoom.common.Completes<Optional<T>> |
maybeActorOf(Class<T> protocol,
Address address)
Answer the
protocol reference of the actor with address as a non-empty
Completes<Optional<T>> eventual outcome, or an empty Completes<Optional<T>>
if not found. |
String |
name()
Answers the
name of this Stage. |
void |
registerCommonSupervisor(Class<?> protocol,
Supervisor common)
Registers with this
Stage the common supervisor for the given protocol. |
io.vlingo.xoom.common.Scheduler |
scheduler()
Answers the
Scheduler of this Stage. |
void |
stop()
Initiates the process of stopping this
Stage. |
Protocols |
testActorFor(Class<?>[] protocols,
Definition definition)
Answers a
Protocols that provides one or more supported protocols for the
newly created Actor according to definition, that can be used for testing. |
<T> TestActor<T> |
testActorFor(Class<T> protocol,
Class<? extends Actor> type,
Object... parameters) |
<T> TestActor<T> |
testActorFor(Class<T> protocol,
Definition definition)
Answers the
TestActor<T>, T being the protocol, of the new created Actor that implements the protocol. |
World |
world()
Answers the
World instance of this Stage. |
protected final io.vlingo.xoom.actors.Directory directory
protected final World world
public Stage(World world, AddressFactory addressFactory, String name)
Stage of theworld, addressFactory, and with name.
Uses default Directory capacity of 32x32.world - the World parent of this StageaddressFactory - the AddressFactory to be usedname - the String name of this Stagepublic Stage(World world, AddressFactory addressFactory, String name, int directoryBuckets, int directoryInitialCapacity)
Stage of theworld, addressFactory, name,
and Directory capacity of directoryBuckets and directoryInitialCapacity.world - the World parent of this StageaddressFactory - the AddressFactory to be usedname - the String name of this StagedirectoryBuckets - the int number of bucketsdirectoryInitialCapacity - the int initial number of elements in each bucketpublic <T> T actorAs(Actor actor, Class<T> protocol)
T protocol type as the means to message the backing Actor.T - the protocol typeactor - the Actor that implements the Class<T> protocolprotocol - the Class<T> protocolpublic <T,A extends Actor> T actorFor(Class<T> protocol, Class<? extends Actor> type, ActorInstantiator<A> instantiator)
T protocol of the newly created Actor that implements the protocol.T - the protocol typeA - the Actor typeprotocol - the Class<T> protocoltype - the Class<? extends Actor> of the Actor to createinstantiator - the ActorInstantiator<A> used to instantiate the Actorpublic <T> T actorFor(Class<T> protocol, Class<? extends Actor> type, Object... parameters)
T protocol of the newly created Actor that implements the protocol.T - the protocol typeprotocol - the Class<T> protocoltype - the Class<? extends Actor> of the Actor to createparameters - the Object[] of constructor parameterspublic <T> T actorFor(Class<T> protocol, Definition definition)
T protocol of the newly created Actor that implements the protocol.T - the protocol typeprotocol - the Class<T> protocoldefinition - the Definition used to initialize the newly created Actorpublic <T> T actorFor(Class<T> protocol, Definition definition, Address address)
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific address.T - the protocol typeprotocol - the Class<T> protocoldefinition - the Definition used to initialize the newly created Actoraddress - the Address to assign to the newly created Actorpublic <T> T actorFor(Class<T> protocol, Definition definition, Logger logger)
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific logger.T - the protocol typeprotocol - the Class<T> protocoldefinition - the Definition used to initialize the newly created Actorlogger - the Logger to assign to the newly created Actorpublic <T> T actorFor(Class<T> protocol, Definition definition, Address address, Logger logger)
T protocol of the newly created Actor that implements the protocol and
that will be assigned the specific address and logger.T - the protocol typeprotocol - the Class<T> protocoldefinition - the Definition used to initialize the newly created Actoraddress - the Address to assign to the newly created Actorlogger - the Logger to assign to the newly created Actorpublic Protocols actorFor(Class<?>[] protocols, Definition definition)
Protocols that provides one or more supported protocols for the
newly created Actor according to definition.protocols - the Class<?>[] array of protocols that the Actor supportsdefinition - the Definition providing parameters to the Actorpublic Protocols actorFor(Class<?>[] protocols, Definition definition, Actor parent, Supervisor maybeSupervisor, Logger logger)
Protocols that provides one or more supported protocols for the
newly created Actor according to definition.protocols - the Class<?>[] array of protocols that the Actor supportsdefinition - the Definition providing parameters to the Actorparent - the Actor that is this actor's parentmaybeSupervisor - the possible Supervisor of this actorlogger - the Logger of this actorpublic Protocols actorFor(Class<?>[] protocols, Class<? extends Actor> type, Object... parameters)
Protocols that provides one or more supported protocols for the
newly created Actor according to definition.protocols - the Class<?>[] array of protocols that the Actor supportstype - the Class<? extends Actor> of the Actor to createparameters - the Object[] of constructor parameterspublic <T> io.vlingo.xoom.common.Completes<T> actorOf(Class<T> protocol, Address address)
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or null if not found.T - the protocol typeprotocol - the Class<T> protocol supported by the backing Actoraddress - the Address of the Actor to findCompletes<T>public <T,A extends Actor> io.vlingo.xoom.common.Completes<T> actorOf(Class<T> protocol, Address address, Class<? extends Actor> type, ActorInstantiator<A> instantiator)
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or the {#code T} instance of
the new Actor created for type by the instantiator.T - the protocol typeA - the Actor typeprotocol - the Class<T> protocoladdress - the Address of the Actor to find or to create the new Actor with if not foundtype - the Class<? extends Actor> of the Actor to createinstantiator - the ActorInstantiator<A> used to instantiate the Actorpublic <T> io.vlingo.xoom.common.Completes<T> actorOf(Class<T> protocol, Address address, Class<? extends Actor> type, Object... parameters)
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or the T instance of
the new Actor created for type with the parameters.T - the protocol typeprotocol - the Class<T> protocol supported by the backing Actoraddress - the Address of the Actor to find or to create the new Actor with if not foundtype - the Class<? extends Actor> of the Actor to createparameters - the Object[] of constructor parametersCompletes<T>public <T> io.vlingo.xoom.common.Completes<T> actorOf(Class<T> protocol, Address address, Definition definition)
Completes<T> that will eventually complete with the T protocol
of the backing Actor of the given address, or a new Actor instance
of the type and definition.T - the protocol typeprotocol - the Class<T> protocol supported by the backing Actoraddress - the Address of the Actor to find and to create the new Actor with if not founddefinition - the Definition providing parameters to the ActorCompletes<T>public AddressFactory addressFactory()
addressFactory.public <T> io.vlingo.xoom.common.Completes<Optional<T>> maybeActorOf(Class<T> protocol, Address address)
protocol reference of the actor with address as a non-empty
Completes<Optional<T>> eventual outcome, or an empty Completes<Optional<T>>
if not found.T - the protocol typeprotocol - the Class<T> of the protocol that the actor must supportaddress - the Address of the actor to findCompletes<Optional<T>>public final <T> TestActor<T> testActorFor(Class<T> protocol, Class<? extends Actor> type, Object... parameters)
public final <T> TestActor<T> testActorFor(Class<T> protocol, Definition definition)
TestActor<T>, T being the protocol, of the new created Actor that implements the protocol.
The TestActor<T> is specifically used for test scenarios and provides runtime access to the internal
Actor instance. Test-based Actor instances are backed by the synchronous TestMailbox.T - the protocol typeprotocol - the Class<T> protocoldefinition - the Definition used to initialize the newly created Actorpublic final Protocols testActorFor(Class<?>[] protocols, Definition definition)
Protocols that provides one or more supported protocols for the
newly created Actor according to definition, that can be used for testing.
Test-based Actor instances are backed by the synchronous TestMailbox.protocols - the Class<T>[] array of protocols that the Actor supportsdefinition - the Definition providing parameters to the Actorpublic int count()
int count of the number of Actor instances contained in this Stage.public void dump()
Actor instances contained in this Stage.public String name()
name of this Stage.public void registerCommonSupervisor(Class<?> protocol, Supervisor common)
Stage the common supervisor for the given protocol.protocol - the Class<T> protocol to be supervised by commoncommon - the Supervisor to serve as the supervisor of all Actors implementing protocolpublic io.vlingo.xoom.common.Scheduler scheduler()
Scheduler of this Stage.public boolean isStopped()
Stage has been stopped or is in the process of stopping.public void conclude()
Stoppableconclude in interface StoppableStoppable.conclude()public void stop()
Stage.public World world()
World instance of this Stage.protected <T> T actorFor(Class<T> protocol, Definition definition, Actor parent, Supervisor maybeSupervisor, Logger logger)
T - the protocol typeprotocol - the Class<T> protocol of the Actordefinition - the Definition of the Actorparent - the Actor parent of this ActormaybeSupervisor - the possible Supervisor of this Actorlogger - the Logger of this Actorprotected Stage.ActorProtocolActor<Object>[] actorProtocolFor(Class<?>[] protocols, Definition definition, Actor parent, Supervisor maybeSupervisor, Logger logger)
protocols - the Class<?>[] protocols of the Actordefinition - the Definition of the Actorparent - the Actor parent of this ActormaybeSupervisor - the possible Supervisor of this Actorlogger - the Logger of this Actorprotected <T> Stage.ActorProtocolActor<T> actorProtocolFor(Class<T> protocol, Definition definition, Actor parent, Address maybeAddress, Mailbox maybeMailbox, Supervisor maybeSupervisor, Logger logger)
T - the protocol typeprotocol - the Class<T> protocol of the Actordefinition - the Definition of the Actorparent - the Actor parent of this ActormaybeAddress - the possible Address of this ActormaybeMailbox - the possible Mailbox of this ActormaybeSupervisor - the possible Supervisor of this Actorlogger - the Logger of this Actorprotected Stage.ActorProtocolActor<Object>[] actorProtocolFor(Class<?>[] protocols, Definition definition, Actor parent, Address maybeAddress, Mailbox maybeMailbox, Supervisor maybeSupervisor, Logger logger)
protocols - the Class<?>[] protocols of the Actordefinition - the Definition of the Actorparent - the Actor parent of this ActormaybeAddress - the possible Address of this ActormaybeMailbox - the possible Mailbox of this ActormaybeSupervisor - the possible Supervisor of this Actorlogger - the Logger of this Actorprotected <T> T actorThunkFor(Class<T> protocol, Definition definition, Address address)
protected void extenderStartDirectoryScanner()
protected Address allocateAddress(Definition definition, Address maybeAddress)
definition - the Definition of the newly created ActormaybeAddress - the possible Addressprotected Mailbox allocateMailbox(Definition definition, Address address, Mailbox maybeMailbox)
definition - the Definition of the newly created Actoraddress - the Address allocated to the ActormaybeMailbox - the possible Mailboxprotected io.vlingo.xoom.actors.Directory directory()
protected ActorFactory.MailboxWrapper mailboxWrapper()
Copyright © 2021. All rights reserved.