/**
  * Added for bug 45749. The attributes in pa are merged into this. Only attributes explicitly set
  * in pa will be merged into this. Any attribute set in pa will take precedence over an attribute
  * in this.
  *
  * @param pa the attributes to merge into this.
  * @since 7.0
  */
 public void merge(PartitionAttributesImpl pa) {
   if (pa.hasRedundancy) {
     setRedundantCopies(pa.getRedundantCopies());
   }
   if (pa.hasLocalMaxMemory) {
     setLocalMaxMemory(pa.getLocalMaxMemory());
   }
   if (pa.hasOffHeap) {
     setOffHeap(pa.getOffHeap());
   }
   if (pa.hasTotalMaxMemory) {
     setTotalMaxMemory(pa.getTotalMaxMemory());
   }
   if (pa.hasTotalNumBuckets) {
     setTotalNumBuckets(pa.getTotalNumBuckets());
   }
   if (pa.hasPartitionResolver) {
     setPartitionResolver(pa.getPartitionResolver());
   }
   if (pa.hasColocatedRegionName) {
     setColocatedWith(pa.getColocatedWith());
   }
   if (pa.hasRecoveryDelay) {
     setRecoveryDelay(pa.getRecoveryDelay());
   }
   if (pa.hasStartupRecoveryDelay) {
     setStartupRecoveryDelay(pa.getStartupRecoveryDelay());
   }
   if (pa.hasFixedPAttrs) {
     addFixedPartitionAttributes(pa.getFixedPartitionAttributes());
   }
   if (pa.hasPartitionListeners) {
     this.addPartitionListeners(pa.partitionListeners);
   }
 }
 @SuppressWarnings("unchecked")
 public void setAll(@SuppressWarnings("rawtypes") PartitionAttributes pa) {
   setRedundantCopies(pa.getRedundantCopies());
   setLocalProperties(pa.getLocalProperties());
   setGlobalProperties(pa.getGlobalProperties());
   setLocalMaxMemory(pa.getLocalMaxMemory());
   setTotalMaxMemory(pa.getTotalMaxMemory());
   setTotalNumBuckets(pa.getTotalNumBuckets());
   setPartitionResolver(pa.getPartitionResolver());
   setColocatedWith(pa.getColocatedWith());
   setRecoveryDelay(pa.getRecoveryDelay());
   setStartupRecoveryDelay(pa.getStartupRecoveryDelay());
   setOffHeap(((PartitionAttributesImpl) pa).getOffHeap());
   addFixedPartitionAttributes(pa.getFixedPartitionAttributes());
 }
 /**
  * Set global properties
  *
  * @deprecated use {@link #setTotalMaxMemory(long)} and {@link #setTotalNumBuckets(int)} in
  *     GemFire 5.1 and later releases
  * @param globalProps those properties for the entire Partitioned Region
  */
 @Deprecated
 public void setGlobalProperties(Properties globalProps) {
   this.globalProperties = globalProps;
   String propVal = globalProps.getProperty(PartitionAttributesFactory.GLOBAL_MAX_MEMORY_PROPERTY);
   if (propVal != null) {
     try {
       setTotalMaxMemory(Integer.parseInt(propVal));
     } catch (RuntimeException e) {
       this.totalMaxMemory = PartitionAttributesFactory.GLOBAL_MAX_MEMORY_DEFAULT;
     }
   }
   propVal = globalProps.getProperty(PartitionAttributesFactory.GLOBAL_MAX_BUCKETS_PROPERTY);
   if (propVal != null) {
     try {
       this.setTotalNumBuckets(Integer.parseInt(propVal));
     } catch (RuntimeException e) {
       this.totalNumBuckets = PartitionAttributesFactory.GLOBAL_MAX_BUCKETS_DEFAULT;
     }
   }
 }