use of org.apache.geode.management.MembershipAttributesData in project geode by apache.
the class RegionMBeanCompositeDataFactory method getMembershipAttributesData.
public static MembershipAttributesData getMembershipAttributesData(RegionAttributes regAttrs) {
MembershipAttributes memAttrs = regAttrs.getMembershipAttributes();
Set<String> requiredRoles = new HashSet<String>();
Iterator<Role> it = memAttrs.getRequiredRoles().iterator();
while (it.hasNext()) {
requiredRoles.add(it.next().getName());
}
String lossAction = memAttrs.getLossAction().toString();
String resumptionAction = memAttrs.getResumptionAction().toString();
MembershipAttributesData membershipAttributesData = new MembershipAttributesData(requiredRoles, lossAction, resumptionAction);
return membershipAttributesData;
}
Aggregations