コード例 #1
0
 /**
  * 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);
   }
 }
コード例 #2
0
 @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());
 }