use of org.opendaylight.controller.cluster.raft.messages.ChangeServersVotingStatus in project controller by opendaylight.
the class ShardManager method onChangeShardServersVotingStatus.
private void onChangeShardServersVotingStatus(final ChangeShardMembersVotingStatus changeMembersVotingStatus) {
LOG.debug("{}: onChangeShardServersVotingStatus: {}", persistenceId(), changeMembersVotingStatus);
String shardName = changeMembersVotingStatus.getShardName();
Map<String, Boolean> serverVotingStatusMap = new HashMap<>();
for (Entry<String, Boolean> e : changeMembersVotingStatus.getMeberVotingStatusMap().entrySet()) {
serverVotingStatusMap.put(getShardIdentifier(MemberName.forName(e.getKey()), shardName).toString(), e.getValue());
}
ChangeServersVotingStatus changeServersVotingStatus = new ChangeServersVotingStatus(serverVotingStatusMap);
findLocalShard(shardName, getSender(), localShardFound -> changeShardMembersVotingStatus(changeServersVotingStatus, shardName, localShardFound.getPath(), getSender()));
}
Aggregations