Package akka.routing
Class RoutedActorCell
- java.lang.Object
-
- akka.actor.ActorCell
-
- akka.routing.RoutedActorCell
-
- All Implemented Interfaces:
AbstractActor.ActorContext
,ActorContext
,ActorRefFactory
,Cell
,ClassicActorContextProvider
,Children
,DeathWatch
,Dispatch
,FaultHandling
,ReceiveTimeout
,UntypedActorContext
- Direct Known Subclasses:
ResizablePoolCell
public class RoutedActorCell extends ActorCell
Add routees to theRouter
. Messages in flight may still be routed to the oldRouter
instance containing the old routees.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RoutedActorCell.RouterActorCreator
-
Constructor Summary
Constructors Constructor Description RoutedActorCell(ActorSystemImpl _system, InternalActorRef _ref, Props _routerProps, MessageDispatcher _routerDispatcher, Props routeeProps, InternalActorRef _supervisor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRoutee(Routee routee)
void
addRoutees(scala.collection.immutable.Iterable<Routee> routees)
Add routees to theRouter
.protected void
preSuperStart()
Called whenrouter
is initialized but beforesuper.start()
to be able to do extra initialization in subclass.void
removeRoutee(Routee routee, boolean stopChild)
void
removeRoutees(scala.collection.immutable.Iterable<Routee> routees, boolean stopChild)
Remove routees from theRouter
.Props
routeeProps()
Router
router()
RouterConfig
routerConfig()
void
sendMessage(Envelope envelope)
Route the message via the router to the selected destination.RoutedActorCell
start()
Start the cell: enqueued message must not be processed before this has been called.-
Methods inherited from class akka.actor.ActorCell
actor, actor_$eq, autoReceiveMessage, become, become, become, become$default$2, classicActorContext, clazz, clearActorCellFields, clearActorFields, contextStack, create, currentMessage, currentMessage_$eq, DefaultState, dispatcher, emptyActorRefSet, emptyBehaviorStack, emptyCancellable, getDispatcher, getParent, getProps, getSelf, getSystem, guardian, handleSupervise, invoke, isLocal, lookupRoot, newActor, newUid, parent, props, provider, publish, receiveMessage, self, sender, setActorFields, splitNameAndUid, stash, SuspendedState, SuspendedWaitForChildrenState, system, systemImpl, systemInvoke, terminatedProps, uid, unbecome, undefinedUid
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.AbstractActor.ActorContext
become, become, cancelReceiveTimeout, findChild, getChild, getChildren, getReceiveTimeout, getSender, setReceiveTimeout
-
Methods inherited from interface akka.actor.ActorContext
become, child, children, receiveTimeout, setReceiveTimeout, unwatch, watch, watchWith, writeObject
-
Methods inherited from interface akka.actor.ActorRefFactory
actorFor, actorFor, actorFor, actorFor, actorOf, actorOf, actorSelection, actorSelection, stop
-
Methods inherited from interface akka.actor.Cell
childrenRefs, getChildByName, getSingleChild, hasMessages, isTerminated, numberOfMessages, restart, resume, sendMessage, sendSystemMessage, stop, suspend
-
Methods inherited from interface akka.actor.dungeon.Children
_childrenRefsDoNotCallMeDirectly_$eq, _functionRefsDoNotCallMeDirectly_$eq, _nextNameDoNotCallMeDirectly_$eq, actorOf, actorOf, addFunctionRef, addFunctionRef$default$2, attachChild, attachChild, checkName, child, children, childrenRefs, findChild, functionRefs, getAllChildStats, getChild, getChildByName, getChildByRef, getChildren, getFunctionRefOrNobody, getFunctionRefOrNobody$default$2, getSingleChild, initChild, isNormal, isTerminating, makeChild, randomName, randomName, removeChildAndGetStateChange, removeFunctionRef, reserveChild, resumeChildren, setChildrenTerminationReason, setTerminated, stop, stopFunctionRefs, suspendChildren, suspendChildren$default$1, swapChildrenRefs, unreserveChild, waitingForChildrenOrNull
-
Methods inherited from interface akka.actor.dungeon.DeathWatch
addressTerminated, addWatcher, checkWatchingSame, isWatching, maintainAddressTerminatedSubscription, maintainAddressTerminatedSubscription$default$1, receivedTerminated, removeFromMap, remWatcher, subscribeAddressTerminated, tellWatchersWeDied, terminatedQueued_$eq, terminatedQueuedFor, unsubscribeAddressTerminated, unwatch, unwatchWatchedActors, updateWatching, watch, watchedActorTerminated, watchedBy_$eq, watching_$eq, watchingContains, watchingGet, watchWith
-
Methods inherited from interface akka.actor.dungeon.Dispatch
_mailboxDoNotCallMeDirectly_$eq, handleException, hasMessages, init, initWithFailure, isTerminated, mailbox, numberOfMessages, restart, resume, sendSystemMessage, serializeAndDeserialize, serializeAndDeserializePayload, stop, suspend, swapMailbox
-
Methods inherited from interface akka.actor.dungeon.FaultHandling
_failed_$eq, clearFailed, faultCreate, faultRecreate, faultResume, faultSuspend, finishCreate, finishRecreate, finishTerminate, handleChildTerminated, handleFailure, handleInvokeFailure, handleNonFatalOrInterruptedException, isFailed, perpetrator, resumeNonRecursive, setFailed, suspendNonRecursive, terminate
-
Methods inherited from interface akka.actor.dungeon.ReceiveTimeout
cancelReceiveTimeout, checkReceiveTimeout, checkReceiveTimeout$default$1, receiveTimeout, receiveTimeoutData_$eq, rescheduleReceiveTimeout, setReceiveTimeout
-
Methods inherited from interface akka.actor.UntypedActorContext
getChild, getChildren
-
-
-
-
Constructor Detail
-
RoutedActorCell
public RoutedActorCell(ActorSystemImpl _system, InternalActorRef _ref, Props _routerProps, MessageDispatcher _routerDispatcher, Props routeeProps, InternalActorRef _supervisor)
-
-
Method Detail
-
routeeProps
public Props routeeProps()
-
routerConfig
public RouterConfig routerConfig()
-
router
public Router router()
-
addRoutee
public void addRoutee(Routee routee)
-
addRoutees
public void addRoutees(scala.collection.immutable.Iterable<Routee> routees)
Add routees to theRouter
. Messages in flight may still be routed to the oldRouter
instance containing the old routees.- Parameters:
routees
- (undocumented)
-
removeRoutee
public void removeRoutee(Routee routee, boolean stopChild)
-
removeRoutees
public void removeRoutees(scala.collection.immutable.Iterable<Routee> routees, boolean stopChild)
Remove routees from theRouter
. Messages in flight may still be routed to the oldRouter
instance containing the old routees.- Parameters:
routees
- (undocumented)stopChild
- (undocumented)
-
start
public RoutedActorCell start()
Description copied from interface:Cell
Start the cell: enqueued message must not be processed before this has been called. The usual action is to attach the mailbox to a dispatcher.- Returns:
- (undocumented)
-
preSuperStart
protected void preSuperStart()
Called whenrouter
is initialized but beforesuper.start()
to be able to do extra initialization in subclass.
-
sendMessage
public void sendMessage(Envelope envelope)
Route the message via the router to the selected destination.- Parameters:
envelope
- (undocumented)
-
-