Search in sources :

Example 1 with FlipMemberVotingStatesForAllShardsOutputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.FlipMemberVotingStatesForAllShardsOutputBuilder in project controller by opendaylight.

the class ClusterAdminRpcService method flipMemberVotingStatesForAllShards.

@Override
public Future<RpcResult<FlipMemberVotingStatesForAllShardsOutput>> flipMemberVotingStatesForAllShards() {
    final List<Entry<ListenableFuture<Success>, ShardResultBuilder>> shardResultData = new ArrayList<>();
    Function<String, Object> messageSupplier = FlipShardMembersVotingStatus::new;
    LOG.info("Flip member voting states for all shards");
    sendMessageToManagerForConfiguredShards(DataStoreType.Config, shardResultData, messageSupplier);
    sendMessageToManagerForConfiguredShards(DataStoreType.Operational, shardResultData, messageSupplier);
    return waitForShardResults(shardResultData, shardResults -> new FlipMemberVotingStatesForAllShardsOutputBuilder().setShardResult(shardResults).build(), "Failed to change member voting states");
}
Also used : Entry(java.util.Map.Entry) SimpleEntry(java.util.AbstractMap.SimpleEntry) FlipMemberVotingStatesForAllShardsOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.FlipMemberVotingStatesForAllShardsOutputBuilder) ArrayList(java.util.ArrayList) Success(akka.actor.Status.Success)

Aggregations

Success (akka.actor.Status.Success)1 SimpleEntry (java.util.AbstractMap.SimpleEntry)1 ArrayList (java.util.ArrayList)1 Entry (java.util.Map.Entry)1 FlipMemberVotingStatesForAllShardsOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.FlipMemberVotingStatesForAllShardsOutputBuilder)1