public static PartitionAttributesData getPartitionAttributesData(PartitionAttributes partAttrs) {

    int redundantCopies = partAttrs.getRedundantCopies();
    long totalMaxMemory = partAttrs.getTotalMaxMemory();
    // Total number of buckets for whole region
    int totalNumBuckets = partAttrs.getTotalNumBuckets();
    int localMaxMemory = partAttrs.getLocalMaxMemory();
    String colocatedWith = partAttrs.getColocatedWith();
    String partitionResolver = null;
    if (partAttrs.getPartitionResolver() != null) {
      partitionResolver = partAttrs.getPartitionResolver().getName();
    }

    long recoveryDelay = partAttrs.getRecoveryDelay();
    long startupRecoveryDelay = partAttrs.getStartupRecoveryDelay();
    String[] partitionListeners = null;
    if (partAttrs.getPartitionListeners() != null) {
      partitionListeners = new String[partAttrs.getPartitionListeners().length];
      for (int i = 0; i < partAttrs.getPartitionListeners().length; i++) {
        partitionListeners[i] =
            (partAttrs.getPartitionListeners())[i].getClass().getCanonicalName();
      }
    }

    PartitionAttributesData partitionAttributesData = new PartitionAttributesData(redundantCopies,
        totalMaxMemory, totalNumBuckets, localMaxMemory, colocatedWith, partitionResolver,
        recoveryDelay, startupRecoveryDelay, partitionListeners);

    return partitionAttributesData;
  }
Utility class to create CompositeDataTypes for RegionMXBean
geode-core/src/main/java/org/apache/geode/management/internal/beans/RegionMBeanCompositeDataFactory.java