Package akka.cluster.pubsub
Class DistributedPubSubMediator
- java.lang.Object
-
- akka.cluster.pubsub.DistributedPubSubMediator
-
- All Implemented Interfaces:
Actor
,ActorLogging
,PerGroupingBuffer
public class DistributedPubSubMediator extends java.lang.Object implements Actor, ActorLogging, PerGroupingBuffer
Gossip to peer nodes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description DistributedPubSubMediator(DistributedPubSubSettings settings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
protected void
akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
The 'self' field holds the ActorRef for this actor.Cluster
cluster()
scala.collection.immutable.Iterable<akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket>
collectDelta(scala.collection.immutable.Map<Address,java.lang.Object> otherVersions)
ActorContext
context()
Scala API: Stores the context for this actor, including self, and sender.long
deltaCount()
void
deltaCount_$eq(long x$1)
scala.collection.immutable.Set<java.lang.String>
getCurrentTopics()
static DistributedPubSubMediator.GetTopics
getTopicsInstance()
void
gossip()
Gossip to peer nodes.Cancellable
gossipTask()
void
gossipTo(Address address)
boolean
matchingRole(Member m)
java.lang.String
mkKey(ActorPath path)
java.lang.String
mkKey(ActorRef ref)
scala.collection.immutable.Map<Address,java.lang.Object>
myVersions()
ActorRef
newTopicActor(java.lang.String encTopic)
scala.Function0<java.lang.Object>
nextVersion()
scala.collection.immutable.Set<Address>
nodes()
void
nodes_$eq(scala.collection.immutable.Set<Address> x$1)
boolean
otherHasNewerVersions(scala.collection.immutable.Map<Address,java.lang.Object> otherVersions)
void
postStop()
User overridable callback.void
preStart()
User overridable callback.static Props
props(DistributedPubSubSettings settings)
void
prune()
scala.concurrent.duration.FiniteDuration
pruneInterval()
Cancellable
pruneTask()
void
publish(java.lang.String path, java.lang.Object msg, boolean allButSelf)
boolean
publish$default$3()
void
publishToEachGroup(java.lang.String path, java.lang.Object msg)
void
put(java.lang.String key, scala.Option<ActorRef> valueOption)
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>
receive()
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.void
registerTopic(ActorRef ref)
scala.collection.immutable.Map<Address,akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket>
registry()
void
registry_$eq(scala.collection.immutable.Map<Address,akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket> x$1)
long
removedTimeToLiveMillis()
scala.Option<Address>
selectRandomNode(scala.collection.immutable.IndexedSeq<Address> addresses)
ActorRef
self()
The 'self' field holds the ActorRef for this actor.-
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, postRestart, preRestart, sender, supervisorStrategy, unhandled
-
Methods inherited from interface akka.actor.ActorLogging
_log_$eq, log
-
Methods inherited from interface akka.cluster.pubsub.PerGroupingBuffer
bufferOr, forwardMessages, forwardMessages, initializeGrouping, recreateAndForwardMessagesIfNeeded
-
-
-
-
Constructor Detail
-
DistributedPubSubMediator
public DistributedPubSubMediator(DistributedPubSubSettings settings)
-
-
Method Detail
-
props
public static Props props(DistributedPubSubSettings settings)
-
getTopicsInstance
public static DistributedPubSubMediator.GetTopics getTopicsInstance()
-
context
public ActorContext context()
Description copied from interface:Actor
Scala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward
.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext
is the Scala API.getContext
returns aAbstractActor.ActorContext
, which is the Java API of the actor context.
-
self
public final ActorRef self()
Description copied from interface:Actor
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
-
akka$actor$Actor$_setter_$context_$eq
protected void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
- Specified by:
akka$actor$Actor$_setter_$context_$eq
in interfaceActor
-
akka$actor$Actor$_setter_$self_$eq
protected final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Description copied from interface:Actor
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Specified by:
akka$actor$Actor$_setter_$self_$eq
in interfaceActor
- Parameters:
x$1
- (undocumented)
-
cluster
public Cluster cluster()
-
removedTimeToLiveMillis
public long removedTimeToLiveMillis()
-
gossipTask
public Cancellable gossipTask()
-
pruneInterval
public scala.concurrent.duration.FiniteDuration pruneInterval()
-
pruneTask
public Cancellable pruneTask()
-
registry
public scala.collection.immutable.Map<Address,akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket> registry()
-
registry_$eq
public void registry_$eq(scala.collection.immutable.Map<Address,akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket> x$1)
-
nodes
public scala.collection.immutable.Set<Address> nodes()
-
nodes_$eq
public void nodes_$eq(scala.collection.immutable.Set<Address> x$1)
-
deltaCount
public long deltaCount()
-
deltaCount_$eq
public void deltaCount_$eq(long x$1)
-
nextVersion
public scala.Function0<java.lang.Object> nextVersion()
-
preStart
public void preStart()
Description copied from interface:Actor
User overridable callback. Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.
-
postStop
public void postStop()
Description copied from interface:Actor
User overridable callback. Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
-
matchingRole
public boolean matchingRole(Member m)
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:Actor
Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
-
publish
public void publish(java.lang.String path, java.lang.Object msg, boolean allButSelf)
-
publish$default$3
public boolean publish$default$3()
-
publishToEachGroup
public void publishToEachGroup(java.lang.String path, java.lang.Object msg)
-
put
public void put(java.lang.String key, scala.Option<ActorRef> valueOption)
-
getCurrentTopics
public scala.collection.immutable.Set<java.lang.String> getCurrentTopics()
-
registerTopic
public void registerTopic(ActorRef ref)
-
mkKey
public java.lang.String mkKey(ActorRef ref)
-
mkKey
public java.lang.String mkKey(ActorPath path)
-
myVersions
public scala.collection.immutable.Map<Address,java.lang.Object> myVersions()
-
collectDelta
public scala.collection.immutable.Iterable<akka.cluster.pubsub.DistributedPubSubMediator.Internal.Bucket> collectDelta(scala.collection.immutable.Map<Address,java.lang.Object> otherVersions)
-
otherHasNewerVersions
public boolean otherHasNewerVersions(scala.collection.immutable.Map<Address,java.lang.Object> otherVersions)
-
gossip
public void gossip()
Gossip to peer nodes.
-
gossipTo
public void gossipTo(Address address)
-
selectRandomNode
public scala.Option<Address> selectRandomNode(scala.collection.immutable.IndexedSeq<Address> addresses)
-
prune
public void prune()
-
newTopicActor
public ActorRef newTopicActor(java.lang.String encTopic)
-
-