|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectakka.contrib.pattern.ShardRegion
public class ShardRegion
This actor creates children entry actors on demand for the shards that it is told to be
responsible for. It delegates messages targeted to other shards to the responsible
ShardRegion
actor on other nodes.
ClusterSharding extension
Nested Class Summary | |
---|---|
static class |
ShardRegion.HandOffStopper
INTERNAL API. |
static interface |
ShardRegion.MessageExtractor
Java API: Interface of functions to extract entry id, shard id, and the message to send to the entry from an incoming message. |
static class |
ShardRegion.Passivate
If the state of the entries are persistent you may stop entries that are not used to reduce memory consumption. |
static class |
ShardRegion.Passivate$
|
static interface |
ShardRegion.ShardRegionCommand
|
Nested classes/interfaces inherited from interface akka.actor.Actor |
---|
Actor.emptyBehavior$ |
Constructor Summary | |
---|---|
ShardRegion(scala.Option<Props> entryProps,
scala.Option<java.lang.String> role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor,
scala.Function1<java.lang.Object,java.lang.String> shardResolver)
|
Method Summary | |
---|---|
scala.math.Ordering<Member> |
ageOrdering()
|
void |
changeMembers(scala.collection.immutable.SortedSet<Member> newMembers)
|
Cluster |
cluster()
|
scala.Option<ActorRef> |
coordinator()
|
scala.Option<ActorSelection> |
coordinatorSelection()
|
void |
deliverMessage(java.lang.Object msg,
ActorRef snd)
|
scala.collection.immutable.Map<ActorRef,java.lang.String> |
entries()
|
scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<ActorRef>> |
entriesByShard()
|
boolean |
matchingRole(Member member)
|
scala.collection.immutable.SortedSet<Member> |
membersByAge()
|
void |
passivate(ActorRef entry,
java.lang.Object stopMessage)
|
scala.collection.immutable.Map<ActorRef,scala.collection.immutable.Vector<scala.Tuple2<java.lang.Object,ActorRef>>> |
passivatingBuffers()
|
void |
postStop()
User overridable callback. |
void |
preStart()
User overridable callback. |
static Props |
props(scala.Option<Props> entryProps,
scala.Option<java.lang.String> role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor,
scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Scala API: Factory method for the Props of the ShardRegion actor. |
static Props |
props(Props entryProps,
scala.Option<java.lang.String> role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor,
scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Scala API: Factory method for the Props of the ShardRegion actor. |
static Props |
props(Props entryProps,
java.lang.String role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
ShardRegion.MessageExtractor messageExtractor)
Java API: Factory method for the Props of the ShardRegion actor. |
static Props |
proxyProps(scala.Option<java.lang.String> role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor,
scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Scala API: Factory method for the Props of the ShardRegion actor
when using it in proxy only mode. |
static Props |
proxyProps(java.lang.String role,
java.lang.String coordinatorPath,
scala.concurrent.duration.FiniteDuration retryInterval,
int bufferSize,
ShardRegion.MessageExtractor messageExtractor)
Java API: : Factory method for the Props of the ShardRegion actor
when using it in proxy only mode. |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function with the actor logic. |
void |
receiveClusterEvent(ClusterEvent.ClusterDomainEvent evt)
|
void |
receiveClusterState(ClusterEvent.CurrentClusterState state)
|
void |
receiveCommand(ShardRegion.ShardRegionCommand cmd)
|
void |
receiveCoordinatorMessage(akka.contrib.pattern.ShardCoordinator.Internal.CoordinatorMessage msg)
|
void |
receiveTerminated(ActorRef ref)
|
scala.collection.immutable.Map<java.lang.String,ActorRef> |
regionByShard()
|
scala.collection.immutable.Map<ActorRef,scala.collection.immutable.Set<java.lang.String>> |
regions()
|
void |
register()
|
java.lang.Object |
registrationMessage()
|
void |
requestShardBufferHomes()
|
Cancellable |
retryTask()
|
scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Vector<scala.Tuple2<java.lang.Object,ActorRef>>> |
shardBuffers()
|
int |
totalBufferSize()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface akka.actor.Actor |
---|
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, preRestart, self, sender, supervisorStrategy, unhandled |
Methods inherited from interface akka.actor.ActorLogging |
---|
_log, log |
Constructor Detail |
---|
public ShardRegion(scala.Option<Props> entryProps, scala.Option<java.lang.String> role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor, scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Method Detail |
---|
public static Props props(scala.Option<Props> entryProps, scala.Option<java.lang.String> role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor, scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Props
of the ShardRegion
actor.
entryProps
- (undocumented)role
- (undocumented)coordinatorPath
- (undocumented)retryInterval
- (undocumented)bufferSize
- (undocumented)idExtractor
- (undocumented)shardResolver
- (undocumented)
public static Props props(Props entryProps, scala.Option<java.lang.String> role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor, scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Props
of the ShardRegion
actor.
entryProps
- (undocumented)role
- (undocumented)coordinatorPath
- (undocumented)retryInterval
- (undocumented)bufferSize
- (undocumented)idExtractor
- (undocumented)shardResolver
- (undocumented)
public static Props props(Props entryProps, java.lang.String role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, ShardRegion.MessageExtractor messageExtractor)
Props
of the ShardRegion
actor.
entryProps
- (undocumented)role
- (undocumented)coordinatorPath
- (undocumented)retryInterval
- (undocumented)bufferSize
- (undocumented)messageExtractor
- (undocumented)
public static Props proxyProps(scala.Option<java.lang.String> role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, scala.PartialFunction<java.lang.Object,scala.Tuple2<java.lang.String,java.lang.Object>> idExtractor, scala.Function1<java.lang.Object,java.lang.String> shardResolver)
Props
of the ShardRegion
actor
when using it in proxy only mode.
role
- (undocumented)coordinatorPath
- (undocumented)retryInterval
- (undocumented)bufferSize
- (undocumented)idExtractor
- (undocumented)shardResolver
- (undocumented)
public static Props proxyProps(java.lang.String role, java.lang.String coordinatorPath, scala.concurrent.duration.FiniteDuration retryInterval, int bufferSize, ShardRegion.MessageExtractor messageExtractor)
Props
of the ShardRegion
actor
when using it in proxy only mode.
role
- (undocumented)coordinatorPath
- (undocumented)retryInterval
- (undocumented)bufferSize
- (undocumented)messageExtractor
- (undocumented)
public Cluster cluster()
public scala.math.Ordering<Member> ageOrdering()
public scala.collection.immutable.SortedSet<Member> membersByAge()
public scala.collection.immutable.Map<ActorRef,scala.collection.immutable.Set<java.lang.String>> regions()
public scala.collection.immutable.Map<java.lang.String,ActorRef> regionByShard()
public scala.collection.immutable.Map<ActorRef,java.lang.String> entries()
public scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Set<ActorRef>> entriesByShard()
public scala.collection.immutable.Map<java.lang.String,scala.collection.immutable.Vector<scala.Tuple2<java.lang.Object,ActorRef>>> shardBuffers()
public scala.collection.immutable.Map<ActorRef,scala.collection.immutable.Vector<scala.Tuple2<java.lang.Object,ActorRef>>> passivatingBuffers()
public int totalBufferSize()
public Cancellable retryTask()
public void preStart()
Actor
preStart
in interface Actor
public void postStop()
Actor
postStop
in interface Actor
public boolean matchingRole(Member member)
public scala.Option<ActorSelection> coordinatorSelection()
public scala.Option<ActorRef> coordinator()
public void changeMembers(scala.collection.immutable.SortedSet<Member> newMembers)
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Actor
receive
in interface Actor
public void receiveClusterState(ClusterEvent.CurrentClusterState state)
public void receiveClusterEvent(ClusterEvent.ClusterDomainEvent evt)
public void receiveCoordinatorMessage(akka.contrib.pattern.ShardCoordinator.Internal.CoordinatorMessage msg)
public void receiveCommand(ShardRegion.ShardRegionCommand cmd)
public void receiveTerminated(ActorRef ref)
public void register()
public java.lang.Object registrationMessage()
public void requestShardBufferHomes()
public void deliverMessage(java.lang.Object msg, ActorRef snd)
public void passivate(ActorRef entry, java.lang.Object stopMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |