use of com.hazelcast.cp.internal.operation.GetLeadedGroupsOp in project hazelcast by hazelcast.
the class CPGroupRebalanceTest method getLeadershipsMap.
private Map<CPMember, Collection<CPGroupId>> getLeadershipsMap(HazelcastInstance instance, Collection<CPMember> members) {
OperationServiceImpl operationService = getOperationService(instance);
Map<CPMember, Collection<CPGroupId>> leaderships = new HashMap<>();
for (CPMember member : members) {
Collection<CPGroupId> groups = operationService.<Collection<CPGroupId>>invokeOnTarget(null, new GetLeadedGroupsOp(), member.getAddress()).join();
leaderships.put(member, groups);
}
return leaderships;
}
Aggregations