akka.cluster
Class ClusterDomainEventPublisher
java.lang.Object
akka.cluster.ClusterDomainEventPublisher
- All Implemented Interfaces:
- Actor, ActorLogging, RequiresMessageQueue<UnboundedMessageQueueSemantics>
public final class ClusterDomainEventPublisher
- extends java.lang.Object
- implements Actor, ActorLogging, RequiresMessageQueue<UnboundedMessageQueueSemantics>
INTERNAL API.
Responsible for domain event subscriptions and publishing of
domain events to event bus.
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, preStart, self, sender, supervisorStrategy, unhandled |
ClusterDomainEventPublisher
public ClusterDomainEventPublisher()
selfUniqueAddress
public UniqueAddress selfUniqueAddress()
latestGossip
public Gossip latestGossip()
preRestart
public void preRestart(java.lang.Throwable reason,
scala.Option<java.lang.Object> message)
- Description copied from interface:
Actor
- User overridable callback: '''By default it disposes of all children and then calls
postStop()
.'''
- Specified by:
preRestart
in interface Actor
- Parameters:
reason
- the Throwable that caused the restart to happenmessage
- optionally the current message the actor processed when failing, if applicable
Is called on a crashed Actor right BEFORE it is restarted to allow clean
up of resources before Actor is terminated.
postStop
public void postStop()
- Description copied from interface:
Actor
- User overridable callback.
Is called asynchronously after 'actor.stop()' is invoked.
Empty default implementation.
- Specified by:
postStop
in interface Actor
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
- Description copied from interface:
Actor
- This defines the initial actor behavior, it must return a partial function
with the actor logic.
- Specified by:
receive
in interface Actor
- Returns:
- (undocumented)
eventStream
public EventStream eventStream()
publishCurrentClusterState
public void publishCurrentClusterState(scala.Option<ActorRef> receiver)
- The current snapshot state corresponding to latest gossip
to mimic what you would have seen if you were listening to the events.
- Parameters:
receiver
- (undocumented)
subscribe
public void subscribe(ActorRef subscriber,
ClusterEvent.SubscriptionInitialStateMode initMode,
scala.collection.immutable.Set<java.lang.Class<?>> to)
unsubscribe
public void unsubscribe(ActorRef subscriber,
scala.Option<java.lang.Class<?>> to)
publishChanges
public void publishChanges(Gossip newGossip)
publishDiff
public void publishDiff(Gossip oldGossip,
Gossip newGossip,
scala.Function1<java.lang.Object,scala.runtime.BoxedUnit> pub)
publishInternalStats
public void publishInternalStats(ClusterEvent.CurrentInternalStats currentStats)
publish
public void publish(java.lang.Object event)
publishStart
public void publishStart()
clearState
public void clearState()