Class ClusterAdminRpcService
- java.lang.Object
-
- org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcService
-
- All Implemented Interfaces:
ClusterAdminService
,RpcService
public class ClusterAdminRpcService extends Object implements ClusterAdminService
Implements the yang RPCs defined in the generated ClusterAdminService interface.- Author:
- Thomas Pantelis
-
-
Constructor Summary
Constructors Constructor Description ClusterAdminRpcService(DistributedDataStoreInterface configDataStore, DistributedDataStoreInterface operDataStore, BindingNormalizedNodeSerializer serializer)
-
Method Summary
-
-
-
Constructor Detail
-
ClusterAdminRpcService
public ClusterAdminRpcService(DistributedDataStoreInterface configDataStore, DistributedDataStoreInterface operDataStore, BindingNormalizedNodeSerializer serializer)
-
-
Method Detail
-
addShardReplica
public ListenableFuture<RpcResult<AddShardReplicaOutput>> addShardReplica(AddShardReplicaInput input)
Description copied from interface:ClusterAdminService
Adds a replica of a shard to this node and joins it to an existing cluster. The shard must already have a module configuration defined for it and there must already be a shard existing on another node with a leader. This RPC first contacts peer member seed nodes searching for a shard. When found, an AddServer message is sent to the shard leader and applied as described in the Raft paper.- Specified by:
addShardReplica
in interfaceClusterAdminService
-
removeShardReplica
public ListenableFuture<RpcResult<RemoveShardReplicaOutput>> removeShardReplica(RemoveShardReplicaInput input)
Description copied from interface:ClusterAdminService
Removes an existing replica of a shard from this node via the RemoveServer mechanism as described in the Raft paper.- Specified by:
removeShardReplica
in interfaceClusterAdminService
-
locateShard
public ListenableFuture<RpcResult<LocateShardOutput>> locateShard(LocateShardInput input)
Description copied from interface:ClusterAdminService
Return the transport-level information about where a shard has a home.- Specified by:
locateShard
in interfaceClusterAdminService
-
makeLeaderLocal
public ListenableFuture<RpcResult<MakeLeaderLocalOutput>> makeLeaderLocal(MakeLeaderLocalInput input)
Description copied from interface:ClusterAdminService
Attempts to move the shard leader of the given module based shard to the local node. The rpc returns a response after handling of the underlying MakeLeaderLocal message completes. This operation fails if there is no current shard leader due to lack of network connectivity or a cluster majority. In addition, if the local node is not up to date with the current leader, an attempt is made to first sync the local node with the leader. If this cannot be achieved within two election timeout periods the operation fails.- Specified by:
makeLeaderLocal
in interfaceClusterAdminService
-
addPrefixShardReplica
public ListenableFuture<RpcResult<AddPrefixShardReplicaOutput>> addPrefixShardReplica(AddPrefixShardReplicaInput input)
Description copied from interface:ClusterAdminService
Adds a replica of a shard to this node and joins it to an existing cluster. There must already be a shard existing on another node with a leader. This RPC first contacts peer member seed nodes searching for a shard. When found, an AddServer message is sent to the shard leader and applied as described in the Raft paper.- Specified by:
addPrefixShardReplica
in interfaceClusterAdminService
-
removePrefixShardReplica
public ListenableFuture<RpcResult<RemovePrefixShardReplicaOutput>> removePrefixShardReplica(RemovePrefixShardReplicaInput input)
Description copied from interface:ClusterAdminService
Removes an existing replica of a prefix shard from this node via the RemoveServer mechanism as described in the Raft paper.- Specified by:
removePrefixShardReplica
in interfaceClusterAdminService
-
addReplicasForAllShards
public ListenableFuture<RpcResult<AddReplicasForAllShardsOutput>> addReplicasForAllShards(AddReplicasForAllShardsInput input)
Description copied from interface:ClusterAdminService
Adds replicas on this node for all currently defined shards. This is equivalent to issuing an add-shard-replica RPC for all shards.- Specified by:
addReplicasForAllShards
in interfaceClusterAdminService
-
removeAllShardReplicas
public ListenableFuture<RpcResult<RemoveAllShardReplicasOutput>> removeAllShardReplicas(RemoveAllShardReplicasInput input)
Description copied from interface:ClusterAdminService
Removes replicas for all shards on this node. This is equivalent to issuing a remove-shard-replica for all shards and essentially removes this node from a cluster.- Specified by:
removeAllShardReplicas
in interfaceClusterAdminService
-
changeMemberVotingStatesForShard
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForShardOutput>> changeMemberVotingStatesForShard(ChangeMemberVotingStatesForShardInput input)
Description copied from interface:ClusterAdminService
Changes the voting states, either voting or non-voting, of cluster members for a shard. Non-voting members will no longer participate in leader elections and consensus but will be replicated. This is useful for having a set of members serve as a backup cluster in case the primary voting cluster suffers catastrophic failure. This RPC can be issued to any cluster member and will be forwarded to the leader.- Specified by:
changeMemberVotingStatesForShard
in interfaceClusterAdminService
-
changeMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForAllShardsOutput>> changeMemberVotingStatesForAllShards(ChangeMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminService
Changes the voting states, either voting or non-voting, of cluster members for all shards. Non-voting members will no longer participate in leader elections and consensus but will be replicated. This is useful for having a set of members serve as a backup cluster in case the primary voting cluster suffers catastrophic failure. This RPC can be issued to any cluster member and will be forwarded to the leader.- Specified by:
changeMemberVotingStatesForAllShards
in interfaceClusterAdminService
-
flipMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<FlipMemberVotingStatesForAllShardsOutput>> flipMemberVotingStatesForAllShards(FlipMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminService
Flips the voting states of all cluster members for all shards, such that if a member was voting it becomes non-voting and vice versa.- Specified by:
flipMemberVotingStatesForAllShards
in interfaceClusterAdminService
-
getShardRole
public ListenableFuture<RpcResult<GetShardRoleOutput>> getShardRole(GetShardRoleInput input)
Description copied from interface:ClusterAdminService
Returns the current role for the requested module shard.- Specified by:
getShardRole
in interfaceClusterAdminService
-
getPrefixShardRole
public ListenableFuture<RpcResult<GetPrefixShardRoleOutput>> getPrefixShardRole(GetPrefixShardRoleInput input)
Description copied from interface:ClusterAdminService
Returns the current role for the requested module shard.- Specified by:
getPrefixShardRole
in interfaceClusterAdminService
-
backupDatastore
public ListenableFuture<RpcResult<BackupDatastoreOutput>> backupDatastore(BackupDatastoreInput input)
Description copied from interface:ClusterAdminService
Creates a backup file of the datastore state- Specified by:
backupDatastore
in interfaceClusterAdminService
-
getKnownClientsForAllShards
public ListenableFuture<RpcResult<GetKnownClientsForAllShardsOutput>> getKnownClientsForAllShards(GetKnownClientsForAllShardsInput input)
Description copied from interface:ClusterAdminService
Request all shards to report their known frontend clients. This is useful for determining what generation should a resurrected member node should use.- Specified by:
getKnownClientsForAllShards
in interfaceClusterAdminService
-
-