Class RpcRegistry
java.lang.Object
org.apache.pekko.actor.AbstractActor
org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor
org.opendaylight.controller.cluster.common.actor.AbstractUntypedActorWithMetering
org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor<RoutingTable>
org.opendaylight.controller.remote.rpc.registry.RpcRegistry
- All Implemented Interfaces:
Actor,ExecuteInSelfActor
Registry to look up cluster nodes that have registered for a given RPC.
It uses BucketStoreActor to maintain this
cluster-wide information.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classNested classes/interfaces inherited from class org.apache.pekko.actor.AbstractActor
AbstractActor.ActorContext, AbstractActor.ReceiveNested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$ -
Constructor Summary
ConstructorsConstructorDescriptionRpcRegistry(RemoteOpsProviderConfig config, Path directory, ActorRef rpcInvoker, ActorRef rpcRegistrar) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleReceive(Object message) Receive and handle an incoming message.protected Loggerlog()protected voidonBucketRemoved(Address address, Bucket<RoutingTable> bucket) Callback to subclasses invoked when a bucket is removed.protected voidonBucketsUpdated(Map<Address, Bucket<RoutingTable>> buckets) Callback to subclasses invoked when the set of remote buckets is updated.voidpostStop()voidpreStart()static Propsprops(RemoteOpsProviderConfig config, Path directory, ActorRef rpcInvoker, ActorRef rpcRegistrar) Create a new props instance for instantiating an RpcRegistry actor.Methods inherited from class org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor
getConfig, getLocalData, getRemoteBuckets, getSender, getVersions, updateLocalBucketMethods inherited from class org.opendaylight.controller.cluster.common.actor.AbstractUntypedActorWithMetering
getActorNameOverrideMethods inherited from class org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor
createReceive, executeInSelf, getContext, ignoreMessage, isValidSender, unknownMessageMethods inherited from class org.apache.pekko.actor.AbstractActor
context, emptyBehavior, getSelf, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, preRestart, preRestart, receive, receiveBuilder, self, supervisorStrategyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, sender, unhandled
-
Constructor Details
-
RpcRegistry
public RpcRegistry(RemoteOpsProviderConfig config, Path directory, ActorRef rpcInvoker, ActorRef rpcRegistrar)
-
-
Method Details
-
props
public static Props props(RemoteOpsProviderConfig config, Path directory, ActorRef rpcInvoker, ActorRef rpcRegistrar) Create a new props instance for instantiating an RpcRegistry actor.- Parameters:
config- Provider configurationdirectory- Persistence directoryrpcInvoker- Actor handling RPC invocation requests from remote nodesrpcRegistrar- Local RPC provider interface, used to register routers to remote nodes- Returns:
- A new
Propsinstance
-
log
- Specified by:
login classBucketStoreActor<RoutingTable>
-
preStart
- Specified by:
preStartin interfaceActor- Overrides:
preStartin classBucketStoreActor<RoutingTable>- Throws:
IOException
-
postStop
- Specified by:
postStopin interfaceActor- Overrides:
postStopin classAbstractActor- Throws:
Exception
-
handleReceive
Description copied from class:AbstractUntypedActorReceive and handle an incoming message. If the implementation does not handle this particular message, it should callAbstractUntypedActor.ignoreMessage(Object)orAbstractUntypedActor.unknownMessage(Object).- Overrides:
handleReceivein classBucketStoreActor<RoutingTable>- Parameters:
message- the incoming message
-
onBucketRemoved
Description copied from class:BucketStoreActorCallback to subclasses invoked when a bucket is removed.- Specified by:
onBucketRemovedin classBucketStoreActor<RoutingTable>- Parameters:
address- Remote addressbucket- Bucket removed
-
onBucketsUpdated
Description copied from class:BucketStoreActorCallback to subclasses invoked when the set of remote buckets is updated.- Specified by:
onBucketsUpdatedin classBucketStoreActor<RoutingTable>- Parameters:
buckets- Map of address to new bucket. Never null, but can be empty.
-