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, DataCenterControl dataCenterControl)
-
Method Summary
-
-
-
Constructor Detail
-
ClusterAdminRpcService
public ClusterAdminRpcService(DistributedDataStoreInterface configDataStore, DistributedDataStoreInterface operDataStore, BindingNormalizedNodeSerializer serializer, DataCenterControl dataCenterControl)
-
-
Method Detail
-
addShardReplica
public ListenableFuture<RpcResult<AddShardReplicaOutput>> addShardReplica(AddShardReplicaInput input)
Description copied from interface:ClusterAdminService
Invokeadd-shard-replica
RPC.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
- Parameters:
input
- ofadd-shard-replica
- Returns:
- output of
add-shard-replica
-
removeShardReplica
public ListenableFuture<RpcResult<RemoveShardReplicaOutput>> removeShardReplica(RemoveShardReplicaInput input)
Description copied from interface:ClusterAdminService
Invokeremove-shard-replica
RPC.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
- Parameters:
input
- ofremove-shard-replica
- Returns:
- output of
remove-shard-replica
-
locateShard
public ListenableFuture<RpcResult<LocateShardOutput>> locateShard(LocateShardInput input)
Description copied from interface:ClusterAdminService
Invokelocate-shard
RPC.Return the transport-level information about where a shard has a home.
- Specified by:
locateShard
in interfaceClusterAdminService
- Parameters:
input
- oflocate-shard
- Returns:
- output of
locate-shard
-
makeLeaderLocal
public ListenableFuture<RpcResult<MakeLeaderLocalOutput>> makeLeaderLocal(MakeLeaderLocalInput input)
Description copied from interface:ClusterAdminService
Invokemake-leader-local
RPC.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
- Parameters:
input
- ofmake-leader-local
- Returns:
- output of
make-leader-local
-
addReplicasForAllShards
public ListenableFuture<RpcResult<AddReplicasForAllShardsOutput>> addReplicasForAllShards(AddReplicasForAllShardsInput input)
Description copied from interface:ClusterAdminService
Invokeadd-replicas-for-all-shards
RPC.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
- Parameters:
input
- ofadd-replicas-for-all-shards
- Returns:
- output of
add-replicas-for-all-shards
-
removeAllShardReplicas
public ListenableFuture<RpcResult<RemoveAllShardReplicasOutput>> removeAllShardReplicas(RemoveAllShardReplicasInput input)
Description copied from interface:ClusterAdminService
Invokeremove-all-shard-replicas
RPC.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
- Parameters:
input
- ofremove-all-shard-replicas
- Returns:
- output of
remove-all-shard-replicas
-
changeMemberVotingStatesForShard
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForShardOutput>> changeMemberVotingStatesForShard(ChangeMemberVotingStatesForShardInput input)
Description copied from interface:ClusterAdminService
Invokechange-member-voting-states-for-shard
RPC.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
- Parameters:
input
- ofchange-member-voting-states-for-shard
- Returns:
- output of
change-member-voting-states-for-shard
-
changeMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<ChangeMemberVotingStatesForAllShardsOutput>> changeMemberVotingStatesForAllShards(ChangeMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminService
Invokechange-member-voting-states-for-all-shards
RPC.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
- Parameters:
input
- ofchange-member-voting-states-for-all-shards
- Returns:
- output of
change-member-voting-states-for-all-shards
-
flipMemberVotingStatesForAllShards
public ListenableFuture<RpcResult<FlipMemberVotingStatesForAllShardsOutput>> flipMemberVotingStatesForAllShards(FlipMemberVotingStatesForAllShardsInput input)
Description copied from interface:ClusterAdminService
Invokeflip-member-voting-states-for-all-shards
RPC.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
- Parameters:
input
- offlip-member-voting-states-for-all-shards
- Returns:
- output of
flip-member-voting-states-for-all-shards
-
getShardRole
public ListenableFuture<RpcResult<GetShardRoleOutput>> getShardRole(GetShardRoleInput input)
Description copied from interface:ClusterAdminService
Invokeget-shard-role
RPC.Returns the current role for the requested module shard.
- Specified by:
getShardRole
in interfaceClusterAdminService
- Parameters:
input
- ofget-shard-role
- Returns:
- output of
get-shard-role
-
backupDatastore
public ListenableFuture<RpcResult<BackupDatastoreOutput>> backupDatastore(BackupDatastoreInput input)
Description copied from interface:ClusterAdminService
Invokebackup-datastore
RPC.Creates a backup file of the datastore state
- Specified by:
backupDatastore
in interfaceClusterAdminService
- Parameters:
input
- ofbackup-datastore
- Returns:
- output of
backup-datastore
-
getKnownClientsForAllShards
public ListenableFuture<RpcResult<GetKnownClientsForAllShardsOutput>> getKnownClientsForAllShards(GetKnownClientsForAllShardsInput input)
Description copied from interface:ClusterAdminService
Invokeget-known-clients-for-all-shards
RPC.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
- Parameters:
input
- ofget-known-clients-for-all-shards
- Returns:
- output of
get-known-clients-for-all-shards
-
activateEosDatacenter
public ListenableFuture<RpcResult<ActivateEosDatacenterOutput>> activateEosDatacenter(ActivateEosDatacenterInput input)
Description copied from interface:ClusterAdminService
Invokeactivate-eos-datacenter
RPC.Activates the datacenter that the node this rpc is called on belongs to. The caller must maintain only a single active datacenter at a time as the singleton components will interfere with each other otherwise. This only needs to be used if configuring multiple datacenters or if not using default datacenter.
- Specified by:
activateEosDatacenter
in interfaceClusterAdminService
- Parameters:
input
- ofactivate-eos-datacenter
- Returns:
- output of
activate-eos-datacenter
-
deactivateEosDatacenter
public ListenableFuture<RpcResult<DeactivateEosDatacenterOutput>> deactivateEosDatacenter(DeactivateEosDatacenterInput input)
Description copied from interface:ClusterAdminService
Invokedeactivate-eos-datacenter
RPC.Deactivates the datacenter that the node this rpc is called on belongs to. The caller must maintain only a single active datacenter at a time as the singleton components will interfere with each other otherwise. This only needs to be used if configuring multiple datacenters or if not using default datacenter.
- Specified by:
deactivateEosDatacenter
in interfaceClusterAdminService
- Parameters:
input
- ofdeactivate-eos-datacenter
- Returns:
- output of
deactivate-eos-datacenter
-
-