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:ClusterAdminServiceAdds 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:
addShardReplicain interfaceClusterAdminService
-
removeShardReplica
public ListenableFuture<RpcResult<RemoveShardReplicaOutput>> removeShardReplica(RemoveShardReplicaInput input)
Description copied from interface:ClusterAdminServiceRemoves an existing replica of a shard from this node via the RemoveServer mechanism as described in the Raft paper.- Specified by:
removeShardReplicain interfaceClusterAdminService
-
locateShard
public ListenableFuture<RpcResult<LocateShardOutput>> locateShard(LocateShardInput input)
Description copied from interface:ClusterAdminServiceReturn the transport-level information about where a shard has a home.- Specified by:
locateShardin interfaceClusterAdminService
-
makeLeaderLocal
public ListenableFuture<RpcResult<MakeLeaderLocalOutput>> makeLeaderLocal(MakeLeaderLocalInput input)
Description copied from interface:ClusterAdminServiceAttempts 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:
makeLeaderLocalin interfaceClusterAdminService
-
addPrefixShardReplica
public ListenableFuture<RpcResult<AddPrefixShardReplicaOutput>> addPrefixShardReplica(AddPrefixShardReplicaInput input)
Description copied from interface:ClusterAdminServiceAdds 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:
addPrefixShardReplicain interfaceClusterAdminService
-
removePrefixShardReplica
public ListenableFuture<RpcResult<RemovePrefixShardReplicaOutput>> removePrefixShardReplica(RemovePrefixShardReplicaInput input)
Description copied from interface:ClusterAdminServiceRemoves an existing replica of a prefix shard from this node via the RemoveServer mechanism as described in the Raft paper.- Specified by:
removePrefixShardReplicain interfaceClusterAdminService
-
addReplicasForAllShards
public ListenableFuture<RpcResult<AddReplicasForAllShardsOutput>> addReplicasForAllShards(AddReplicasForAllShardsInput input)
Description copied from interface:ClusterAdminServiceAdds replicas on this node for all currently defined shards. This is equivalent to issuing an add-shard-replica RPC for all shards.- Specified by:
addReplicasForAllShardsin interfaceClusterAdminService
-
removeAllShardReplicas
public ListenableFuture<RpcResult<RemoveAllShardReplicasOutput>> removeAllShardReplicas(RemoveAllShardReplicasInput input)
Description copied from interface:ClusterAdminServiceRemoves 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:
removeAllShardReplicasin interfaceClusterAdminService
-
changeMemberVotingStatesForShard
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForShardOutput>> changeMemberVotingStatesForShard(ChangeMemberVotingStatesForShardInput input)
Description copied from interface:ClusterAdminServiceChanges 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:
changeMemberVotingStatesForShardin interfaceClusterAdminService
-
changeMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForAllShardsOutput>> changeMemberVotingStatesForAllShards(ChangeMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminServiceChanges 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:
changeMemberVotingStatesForAllShardsin interfaceClusterAdminService
-
flipMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<FlipMemberVotingStatesForAllShardsOutput>> flipMemberVotingStatesForAllShards(FlipMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminServiceFlips 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:
flipMemberVotingStatesForAllShardsin interfaceClusterAdminService
-
getShardRole
public ListenableFuture<RpcResult<GetShardRoleOutput>> getShardRole(GetShardRoleInput input)
Description copied from interface:ClusterAdminServiceReturns the current role for the requested module shard.- Specified by:
getShardRolein interfaceClusterAdminService
-
getPrefixShardRole
public ListenableFuture<RpcResult<GetPrefixShardRoleOutput>> getPrefixShardRole(GetPrefixShardRoleInput input)
Description copied from interface:ClusterAdminServiceReturns the current role for the requested module shard.- Specified by:
getPrefixShardRolein interfaceClusterAdminService
-
backupDatastore
public ListenableFuture<RpcResult<BackupDatastoreOutput>> backupDatastore(BackupDatastoreInput input)
Description copied from interface:ClusterAdminServiceCreates a backup file of the datastore state- Specified by:
backupDatastorein interfaceClusterAdminService
-
getKnownClientsForAllShards
public ListenableFuture<RpcResult<GetKnownClientsForAllShardsOutput>> getKnownClientsForAllShards(GetKnownClientsForAllShardsInput input)
Description copied from interface:ClusterAdminServiceRequest all shards to report their known frontend clients. This is useful for determining what generation should a resurrected member node should use.- Specified by:
getKnownClientsForAllShardsin interfaceClusterAdminService
-
-