geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [05/36] geode git commit: GEODE-2632: change dependencies on GemFireCacheImpl to InternalCache
Date Mon, 01 May 2017 19:49:18 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
index 5d44b20..e1c708a 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchKeysMessage.java
@@ -181,7 +181,7 @@ public final class FetchKeysMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketId=").append(this.bucketId);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessage.java
index 76a0dac..5f4dec1 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchPartitionDetailsMessage.java
@@ -120,7 +120,7 @@ public class FetchPartitionDetailsMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; internal=").append(this.internal);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
index 54e80c6..1c2a6a7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/GetMessage.java
@@ -219,7 +219,7 @@ public final class GetMessage extends PartitionMessageWithDirectReply {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; key=").append(this.key).append("; callback arg=").append(this.cbArg)
         .append("; context=").append(this.context);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
index a0cda9b..8259818 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/InterestEventMessage.java
@@ -96,7 +96,7 @@ public class InterestEventMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; event=").append(this.event);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBackupBucketMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBackupBucketMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBackupBucketMessage.java
index 65cb072..786006e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBackupBucketMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBackupBucketMessage.java
@@ -192,9 +192,10 @@ public final class ManageBackupBucketMessage extends PartitionMessage {
    * Assists the toString method in reporting the contents of this message
    * 
    * @see PartitionMessage#toString()
+   * @param buff
    */
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketId=").append(this.bucketId);
     buff.append("; isRebalance=").append(this.isRebalance);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBucketMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBucketMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBucketMessage.java
index 85b9af8..1092145 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBucketMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ManageBucketMessage.java
@@ -189,9 +189,10 @@ public final class ManageBucketMessage extends PartitionMessage {
    * Assists the toString method in reporting the contents of this message
    * 
    * @see PartitionMessage#toString()
+   * @param buff
    */
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketId=").append(this.bucketId).append("; bucketSize=")
         .append(this.bucketSize);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessage.java
index 43e4341..8a607c0 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/MoveBucketMessage.java
@@ -119,7 +119,7 @@ public class MoveBucketMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketId=").append(this.bucketId);
     buff.append("; source=").append(this.source);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java
index fe1acfa..5c5af24 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java
@@ -68,7 +68,7 @@ public final class PRSanityCheckMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append(" regionName=").append(this.regionName);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
index 0e6b707..3552b5d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRTombstoneMessage.java
@@ -25,7 +25,6 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
-import org.apache.geode.InternalGemFireError;
 import org.apache.geode.cache.Operation;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.DistributionMessage;
@@ -113,7 +112,7 @@ public final class PRTombstoneMessage extends PartitionMessageWithDirectReply
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; keys=").append(this.keys.size());
     buff.append("; eventID=").append(this.eventID);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRUpdateEntryVersionMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
index 1dcf27f..eb7dcaf 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRUpdateEntryVersionMessage.java
@@ -200,10 +200,11 @@ public class PRUpdateEntryVersionMessage extends PartitionMessageWithDirectReply
    * Assists the toString method in reporting the contents of this message
    * 
    * @see PartitionMessage#toString()
+   * @param buff
    */
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; key=").append(getKey());
     buff.append("; op=").append(this.op);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
index bdd26ce..2314674 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java
@@ -56,7 +56,6 @@ import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.PartitionedRegionException;
 import org.apache.geode.internal.cache.PrimaryBucketException;
-import org.apache.geode.internal.cache.TXId;
 import org.apache.geode.internal.cache.TXManagerImpl;
 import org.apache.geode.internal.cache.TXStateProxy;
 import org.apache.geode.internal.cache.TransactionMessage;
@@ -134,7 +133,7 @@ public abstract class PartitionMessage extends DistributionMessage
     setRecipient(recipient);
     this.regionId = regionId;
     this.processorId = processor == null ? 0 : processor.getProcessorId();
-    if (processor != null && this.isSevereAlertCompatible()) {
+    if (processor != null && isSevereAlertCompatible()) {
       processor.enableSevereAlertProcessing();
     }
     initTxMemberId();
@@ -146,7 +145,7 @@ public abstract class PartitionMessage extends DistributionMessage
     setRecipients(recipients);
     this.regionId = regionId;
     this.processorId = processor == null ? 0 : processor.getProcessorId();
-    if (processor != null && this.isSevereAlertCompatible()) {
+    if (processor != null && isSevereAlertCompatible()) {
       processor.enableSevereAlertProcessing();
     }
     initTxMemberId();
@@ -174,8 +173,6 @@ public abstract class PartitionMessage extends DistributionMessage
 
   /**
    * Copy constructor that initializes the fields declared in this class
-   * 
-   * @param other
    */
   public PartitionMessage(PartitionMessage other) {
     this.regionId = other.regionId;
@@ -321,8 +318,7 @@ public abstract class PartitionMessage extends DistributionMessage
         // the partitioned region can't be found (bug 36585)
         thr = new ForceReattemptException(
             LocalizedStrings.PartitionMessage_0_COULD_NOT_FIND_PARTITIONED_REGION_WITH_ID_1
-                .toLocalizedString(
-                    new Object[] {dm.getDistributionManagerId(), Integer.valueOf(regionId)}));
+                .toLocalizedString(dm.getDistributionManagerId(), regionId));
         return; // reply sent in finally block below
       }
 
@@ -401,8 +397,8 @@ public abstract class PartitionMessage extends DistributionMessage
                   .toLocalizedString());
         }
       }
-      if (logger.isTraceEnabled(LogMarker.DM) && (t instanceof RuntimeException)) {
-        logger.trace(LogMarker.DM, "Exception caught while processing message: ", t.getMessage(),
+      if (logger.isTraceEnabled(LogMarker.DM) && t instanceof RuntimeException) {
+        logger.trace(LogMarker.DM, "Exception caught while processing message: {}", t.getMessage(),
             t);
       }
     } finally {
@@ -598,7 +594,7 @@ public abstract class PartitionMessage extends DistributionMessage
 
   @Override
   public String toString() {
-    StringBuffer buff = new StringBuffer();
+    StringBuilder buff = new StringBuilder();
     String className = getClass().getName();
     // className.substring(className.lastIndexOf('.', className.lastIndexOf('.') - 1) + 1); //
     // partition.<foo> more generic version
@@ -613,7 +609,7 @@ public abstract class PartitionMessage extends DistributionMessage
       if (pr != null) {
         name = pr.getFullPath();
       }
-    } catch (Exception e) {
+    } catch (Exception ignore) {
       /* ignored */
       name = null;
     }
@@ -630,10 +626,10 @@ public abstract class PartitionMessage extends DistributionMessage
 
   /**
    * Helper class of {@link #toString()}
-   * 
+   *
    * @param buff buffer in which to append the state of this instance
    */
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     buff.append(" processorId=").append(this.processorId);
     if (this.notificationOnly) {
       buff.append(" notificationOnly=").append(this.notificationOnly);
@@ -704,7 +700,7 @@ public abstract class PartitionMessage extends DistributionMessage
         return false;
       }
       return pr.notifiesMultipleSerialGateways();
-    } catch (PRLocallyDestroyedException e) {
+    } catch (PRLocallyDestroyedException ignore) {
       return false;
     } catch (RuntimeException ignore) {
       return false;
@@ -770,15 +766,15 @@ public abstract class PartitionMessage extends DistributionMessage
         if (removeMember(id, true)) {
           this.prce = new ForceReattemptException(
               LocalizedStrings.PartitionMessage_PARTITIONRESPONSE_GOT_MEMBERDEPARTED_EVENT_FOR_0_CRASHED_1
-                  .toLocalizedString(new Object[] {id, Boolean.valueOf(crashed)}));
+                  .toLocalizedString(id, crashed));
         }
         checkIfDone();
       } else {
         Exception e = new Exception(
             LocalizedStrings.PartitionMessage_MEMBERDEPARTED_GOT_NULL_MEMBERID.toLocalizedString());
         logger.info(LocalizedMessage.create(
-            LocalizedStrings.PartitionMessage_MEMBERDEPARTED_GOT_NULL_MEMBERID_CRASHED_0,
-            Boolean.valueOf(crashed)), e);
+            LocalizedStrings.PartitionMessage_MEMBERDEPARTED_GOT_NULL_MEMBERID_CRASHED_0, crashed),
+            e);
       }
     }
 
@@ -788,7 +784,6 @@ public abstract class PartitionMessage extends DistributionMessage
      * @throws CacheException if the recipient threw a cache exception during message processing
      * @throws ForceReattemptException if the recipient left the distributed system before the
      *         response was received.
-     * @throws PrimaryBucketException
      */
     final public void waitForCacheException()
         throws CacheException, ForceReattemptException, PrimaryBucketException {

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessageWithDirectReply.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessageWithDirectReply.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessageWithDirectReply.java
index 6bead2e..b5f5e6f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessageWithDirectReply.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessageWithDirectReply.java
@@ -122,7 +122,7 @@ public abstract class PartitionMessageWithDirectReply extends PartitionMessage
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; posDup=").append(this.posDup);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java
index c24a0aa..f7ca7e6 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java
@@ -170,7 +170,7 @@ public class PartitionedRegionFunctionStreamingMessage extends PartitionMessage
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
index 27f5aa0..fbbd6fc 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutAllPRMessage.java
@@ -78,7 +78,7 @@ import org.apache.geode.internal.offheap.annotations.Retained;
  *
  * @since GemFire 6.0
  */
-public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
+public class PutAllPRMessage extends PartitionMessageWithDirectReply {
   private static final Logger logger = LogService.getLogger();
 
   private PutAllEntryData[] putAllPRData;
@@ -118,7 +118,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
 
   public PutAllPRMessage(int bucketId, int size, boolean notificationOnly, boolean posDup,
       boolean skipCallbacks, Object callbackArg) {
-    this.bucketId = Integer.valueOf(bucketId);
+    this.bucketId = bucketId;
     putAllPRData = new PutAllEntryData[size];
     this.notificationOnly = notificationOnly;
     this.posDup = posDup;
@@ -217,7 +217,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
   @Override
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     super.fromData(in);
-    this.bucketId = Integer.valueOf((int) InternalDataSerializer.readSignedVL(in));
+    this.bucketId = (int) InternalDataSerializer.readSignedVL(in);
     if ((flags & HAS_BRIDGE_CONTEXT) != 0) {
       this.bridgeContext = DataSerializer.readObject(in);
     }
@@ -249,7 +249,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
     if (bucketId == null) {
       InternalDataSerializer.writeSignedVL(-1, out);
     } else {
-      InternalDataSerializer.writeSignedVL(bucketId.intValue(), out);
+      InternalDataSerializer.writeSignedVL(bucketId, out);
     }
     if (this.bridgeContext != null) {
       DataSerializer.writeObject(this.bridgeContext, out);
@@ -313,7 +313,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
    * indefinitely for the acknowledgement
    */
   @Override
-  protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion r,
+  protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr,
       long startTime) throws EntryExistsException, ForceReattemptException, DataLocationException {
     boolean sendReply = true;
 
@@ -321,14 +321,14 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
 
     long lastModified = 0L;
     try {
-      result = doLocalPutAll(r, eventSender, lastModified);
+      result = doLocalPutAll(pr, eventSender, lastModified);
     } catch (ForceReattemptException fre) {
-      sendReply(getSender(), getProcessorId(), dm, new ReplyException(fre), r, startTime);
+      sendReply(getSender(), getProcessorId(), dm, new ReplyException(fre), pr, startTime);
       return false;
     }
 
     if (sendReply) {
-      sendReply(getSender(), getProcessorId(), dm, null, r, startTime);
+      sendReply(getSender(), getProcessorId(), dm, null, pr, startTime);
     }
     return false;
   }
@@ -363,8 +363,8 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
    *        lastModified timestamp for last modification
    * @return If succeeds, return true, otherwise, throw exception
    */
-  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "IMSE_DONT_CATCH_IMSE")
-  public final boolean doLocalPutAll(PartitionedRegion r, InternalDistributedMember eventSender,
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings("IMSE_DONT_CATCH_IMSE")
+  public boolean doLocalPutAll(PartitionedRegion r, InternalDistributedMember eventSender,
       long lastModified)
       throws EntryExistsException, ForceReattemptException, DataLocationException {
     boolean didPut = false;
@@ -501,10 +501,8 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
               }
             } // for
 
-          } catch (IllegalMonitorStateException ex) {
-            ForceReattemptException fre =
-                new ForceReattemptException("unable to get lock for primary, retrying... ");
-            throw fre;
+          } catch (IllegalMonitorStateException ignore) {
+            throw new ForceReattemptException("unable to get lock for primary, retrying... ");
           } catch (CacheWriterException cwe) {
             // encounter cacheWriter exception
             partialKeys.saveFailedKey(key, cwe);
@@ -650,7 +648,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
 
 
   @Override
-  protected final void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; putAllPRDataSize=").append(putAllPRDataSize).append("; bucketId=")
         .append(bucketId);
@@ -661,21 +659,16 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
     buff.append("; directAck=").append(this.directAck);
 
     for (int i = 0; i < putAllPRDataSize; i++) {
-      // buff.append("; entry"+i+":").append(putAllPRData[i]);
-      buff.append("; entry" + i + ":").append(putAllPRData[i].getKey()).append(",")
+      buff.append("; entry").append(i).append(":").append(putAllPRData[i].getKey()).append(",")
           .append(putAllPRData[i].versionTag);
     }
   }
 
-  public final InternalDistributedSystem getInternalDs() {
-    return internalDs;
-  }
-
-  public final void setInternalDs(InternalDistributedSystem internalDs) {
+  public void setInternalDs(InternalDistributedSystem internalDs) {
     this.internalDs = internalDs;
   }
 
-  public final void setDirectAck(boolean directAck) {
+  public void setDirectAck(boolean directAck) {
     this.directAck = directAck;
   }
 
@@ -686,10 +679,8 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
 
   @Override
   public String toString() {
-    StringBuffer buff = new StringBuffer();
+    StringBuilder buff = new StringBuilder();
     String className = getClass().getName();
-    // className.substring(className.lastIndexOf('.', className.lastIndexOf('.') - 1) + 1); //
-    // partition.<foo> more generic version
     buff.append(className.substring(className.indexOf(PN_TOKEN) + PN_TOKEN.length())); // partition.<foo>
     buff.append("(prid="); // make sure this is the first one
     buff.append(this.regionId);
@@ -701,7 +692,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
       if (pr != null) {
         name = pr.getFullPath();
       }
-    } catch (Exception e) {
+    } catch (Exception ignore) {
       /* ignored */
       name = null;
     }
@@ -721,7 +712,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
     return buff.toString();
   }
 
-  public static final class PutAllReplyMessage extends ReplyMessage {
+  public static class PutAllReplyMessage extends ReplyMessage {
     /** Result of the PutAll operation */
     boolean result;
     VersionedObjectList versions;
@@ -801,7 +792,7 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
 
     @Override
     public String toString() {
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       sb.append("PutAllReplyMessage ").append("processorid=").append(this.processorId)
           .append(" returning ").append(this.result).append(" exception=").append(getException())
           .append(" versions= ").append(this.versions);
@@ -843,17 +834,6 @@ public final class PutAllPRMessage extends PartitionMessageWithDirectReply {
       } catch (ForceReattemptException e) {
         throw e;
       }
-      // try {
-      // waitForRepliesUninterruptibly();
-      // }
-      // catch (ReplyException e) {
-      // Throwable t = e.getCause();
-      // if (t instanceof CacheClosedException) {
-      // throw new PartitionedRegionCommunicationException("Put operation received an exception",
-      // t);
-      // }
-      // e.handleAsUnexpected();
-      // }
       return new PutAllResult(this.returnValue, this.versions);
     }
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutMessage.java
index dd2698c..1c41e61 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PutMessage.java
@@ -44,7 +44,6 @@ import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.InternalDataSerializer;
 import org.apache.geode.internal.NanoTimer;
 import org.apache.geode.internal.cache.CachedDeserializable;
-import org.apache.geode.internal.cache.CachedDeserializableFactory;
 import org.apache.geode.internal.cache.DataLocationException;
 import org.apache.geode.internal.cache.DistributedCacheOperation;
 import org.apache.geode.internal.cache.EntryEventImpl;
@@ -58,7 +57,6 @@ import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.PartitionedRegionDataStore;
 import org.apache.geode.internal.cache.PrimaryBucketException;
 import org.apache.geode.internal.cache.RemotePutMessage;
-import org.apache.geode.internal.cache.VMCachedDeserializable;
 import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.versions.VersionTag;
 import org.apache.geode.internal.i18n.LocalizedStrings;
@@ -67,7 +65,6 @@ import org.apache.geode.internal.logging.log4j.LogMarker;
 import org.apache.geode.internal.offheap.annotations.Released;
 import org.apache.geode.internal.offheap.annotations.Retained;
 import org.apache.geode.internal.offheap.annotations.Unretained;
-import org.apache.geode.internal.util.BlobHelper;
 
 import static org.apache.geode.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_OLD_VALUE;
 import static org.apache.geode.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_NEW_VALUE;
@@ -826,7 +823,7 @@ public final class PutMessage extends PartitionMessageWithDirectReply implements
 
 
   @Override
-  protected final void appendFields(StringBuffer buff) {
+  protected final void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; key=").append(getKey()).append("; value=");
     // buff.append(getValBytes());

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/QueryMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/QueryMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/QueryMessage.java
index 51844aa..b6028fe 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/QueryMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/QueryMessage.java
@@ -64,18 +64,18 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
   private volatile boolean isPdxSerialized;
   private volatile boolean traceOn;
 
-  // private transient PRQueryResultCollector resultCollector = new PRQueryResultCollector();
-  private transient List<Collection> resultCollector = new ArrayList<Collection>();
-  private transient int tokenCount = 0; // counts how many end of stream tokens received
-  private transient Iterator currentResultIterator;
-  private transient Iterator<Collection> currentSelectResultIterator;
-  private transient boolean isTraceInfoIteration = false;
-  private transient boolean isStructType = false;
+  private final List<Collection> resultCollector = new ArrayList<>();
+  private Iterator currentResultIterator;
+  private Iterator<Collection> currentSelectResultIterator;
+  private boolean isTraceInfoIteration = false;
+  private boolean isStructType = false;
 
   /**
    * Empty constructor to satisfy {@link DataSerializer} requirements
    */
-  public QueryMessage() {}
+  public QueryMessage() {
+    // do nothing
+  }
 
   public QueryMessage(InternalDistributedMember recipient, int regionId, ReplyProcessor21 processor,
       DefaultQuery query, Object[] parameters, final List buckets) {
@@ -87,7 +87,6 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
     this.traceOn = query.isTraced() || DefaultQuery.QUERY_VERBOSE;
   }
 
-
   /**
    * Provide results to send back to requestor. terminate by returning END_OF_STREAM token object
    */
@@ -101,10 +100,11 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
           .toLocalizedString(QueryMonitor.getMemoryUsedDuringLowMemory());
       throw new QueryExecutionLowMemoryException(reason);
     }
-    if (Thread.interrupted())
+    if (Thread.interrupted()) {
       throw new InterruptedException();
+    }
 
-    while ((this.currentResultIterator == null || !this.currentResultIterator.hasNext())) {
+    while (this.currentResultIterator == null || !this.currentResultIterator.hasNext()) {
       if (this.currentSelectResultIterator.hasNext()) {
         if (this.isTraceInfoIteration && this.currentResultIterator != null) {
           this.isTraceInfoIteration = false;
@@ -115,22 +115,20 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
         }
         this.currentResultIterator = results.iterator();
       } else {
-        // Assert.assertTrue(this.resultCollector.isEmpty());
         return Token.END_OF_STREAM;
       }
     }
     Object data = this.currentResultIterator.next();
     boolean isPostGFE_8_1 = this.getSender().getVersionObject().compareTo(Version.GFE_81) > 0;
-    // Asif: There is a bug in older versions of GFE such that the query node expects the structs to
-    // have
+
+    // There is a bug in older versions of GFE such that the query node expects the structs to have
     // type as ObjectTypes only & not specific types. So the new version needs to send the
-    // inaccurate
-    // struct type for backward compatibility.
+    // inaccurate struct type for backward compatibility.
     if (this.isStructType && !this.isTraceInfoIteration && isPostGFE_8_1) {
       return ((Struct) data).getFieldValues();
     } else if (this.isStructType && !this.isTraceInfoIteration) {
-      Struct s = (Struct) data;
-      ObjectType[] fieldTypes = s.getStructType().getFieldTypes();
+      Struct struct = (Struct) data;
+      ObjectType[] fieldTypes = struct.getStructType().getFieldTypes();
       for (int i = 0; i < fieldTypes.length; ++i) {
         fieldTypes[i] = new ObjectTypeImpl(Object.class);
       }
@@ -140,32 +138,27 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
     }
   }
 
-
   @Override
-  protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion r,
+  protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr,
       long startTime)
       throws CacheException, QueryException, ForceReattemptException, InterruptedException {
-    // calculate trace start time if trace is on
-    // this is because the start time is only set if enableClock stats is on
-    // in this case we still want to see trace time even if clock is not enabled
+    // calculate trace start time if trace is on this is because the start time is only set if
+    // enableClock stats is on in this case we still want to see trace time even if clock is not
+    // enabled
     long traceStartTime = 0;
     if (this.traceOn) {
       traceStartTime = NanoTimer.getTime();
     }
-    PRQueryTraceInfo queryTraceInfo = null;
-    List queryTraceList = null;
-    if (Thread.interrupted())
+    if (Thread.interrupted()) {
       throw new InterruptedException();
+    }
     if (logger.isTraceEnabled(LogMarker.DM)) {
       logger.trace(LogMarker.DM, "QueryMessage operateOnPartitionedRegion: {} buckets {}",
-          r.getFullPath(), buckets);
+          pr.getFullPath(), this.buckets);
     }
 
-    r.waitOnInitialization();
-
-    // PartitionedRegionDataStore ds = r.getDataStore();
+    pr.waitOnInitialization();
 
-    // if (ds != null) {
     if (QueryMonitor.isLowMemory()) {
       String reason = LocalizedStrings.QueryMonitor_LOW_MEMORY_CANCELED_QUERY
           .toLocalizedString(QueryMonitor.getMemoryUsedDuringLowMemory());
@@ -174,25 +167,26 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
       throw new QueryExecutionLowMemoryException(reason);
     }
 
-    DefaultQuery query = new DefaultQuery(this.queryString, r.getCache(), false);
+    DefaultQuery query = new DefaultQuery(this.queryString, pr.getCache(), false);
     // Remote query, use the PDX types in serialized form.
-    DefaultQuery.setPdxReadSerialized(r.getCache(), true);
-    // In case of "select *" queries we can keep the results in serialized
-    // form and send
+    DefaultQuery.setPdxReadSerialized(pr.getCache(), true);
+    // In case of "select *" queries we can keep the results in serialized form and send
     query.setRemoteQuery(true);
     QueryObserver indexObserver = query.startTrace();
     boolean isQueryTraced = false;
+    List queryTraceList = null;
+
     try {
       query.setIsCqQuery(this.cqQuery);
-      // ds.queryLocalNode(query, this.parameters, this.buckets,
-      // this.resultCollector);
-      PRQueryProcessor qp = new PRQueryProcessor(r, query, parameters, buckets);
+      PRQueryProcessor qp = new PRQueryProcessor(pr, query, this.parameters, this.buckets);
       if (logger.isDebugEnabled()) {
         logger.debug("Started executing query from remote node: {}", query.getQueryString());
       }
       isQueryTraced =
           query.isTraced() && this.sender.getVersionObject().compareTo(Version.GFE_81) >= 0;
+
       // Adds a query trace info object to the results list for remote queries
+      PRQueryTraceInfo queryTraceInfo = null;
       if (isQueryTraced) {
         this.isTraceInfoIteration = true;
         if (DefaultQuery.testHook != null) {
@@ -200,85 +194,77 @@ public final class QueryMessage extends StreamingPartitionOperation.StreamingPar
         }
         queryTraceInfo = new PRQueryTraceInfo();
         queryTraceList = Collections.singletonList(queryTraceInfo);
-
       }
 
       this.isStructType = qp.executeQuery(this.resultCollector);
-      // Add the trace info list object after the NWayMergeResults is created so as to
-      // exclude it from the sorted collection of NWayMergeResults
+      // Add the trace info list object after the NWayMergeResults is created so as to exclude it
+      // from the sorted collection of NWayMergeResults
       if (isQueryTraced) {
         this.resultCollector.add(0, queryTraceList);
       }
       this.currentSelectResultIterator = this.resultCollector.iterator();
 
-      // If trace is enabled, we will generate a trace object to send back
-      // The time info will be slightly different than the one logged on this
-      // node
-      // due to generating the trace object information here rather than the
-      // finally
-      // block.
+      // If trace is enabled, we will generate a trace object to send back. The time info will be
+      // slightly different than the one logged on this node due to generating the trace object
+      // information here rather than the finally block.
       if (isQueryTraced) {
         if (DefaultQuery.testHook != null) {
           DefaultQuery.testHook.doTestHook("Populating Trace Info for Remote Query");
         }
+
         // calculate the number of rows being sent
-        int traceSize = 0;
-        traceSize = queryTraceInfo.calculateNumberOfResults(resultCollector);
-        traceSize -= 1; // subtract the query trace info object
+        int traceSize = queryTraceInfo.calculateNumberOfResults(this.resultCollector);
+        // subtract the query trace info object
+        traceSize -= 1;
         queryTraceInfo.setTimeInMillis((NanoTimer.getTime() - traceStartTime) / 1.0e6f);
         queryTraceInfo.setNumResults(traceSize);
+
         // created the indexes used string
         if (indexObserver instanceof IndexTrackingQueryObserver) {
           Map indexesUsed = ((IndexTrackingQueryObserver) indexObserver).getUsedIndexes();
-          StringBuffer buf = new StringBuffer();
-          buf.append(" indexesUsed(").append(indexesUsed.size()).append(")");
+          StringBuilder sb = new StringBuilder();
+          sb.append(" indexesUsed(").append(indexesUsed.size()).append(")");
           if (indexesUsed.size() > 0) {
-            buf.append(":");
+            sb.append(":");
             for (Iterator itr = indexesUsed.entrySet().iterator(); itr.hasNext();) {
               Map.Entry entry = (Map.Entry) itr.next();
-              buf.append(entry.getKey().toString() + entry.getValue());
+              sb.append(entry.getKey()).append(entry.getValue());
               if (itr.hasNext()) {
-                buf.append(",");
+                sb.append(",");
               }
             }
           }
-          queryTraceInfo.setIndexesUsed(buf.toString());
+          queryTraceInfo.setIndexesUsed(sb.toString());
         }
       }
 
-      // resultSize = this.resultCollector.size() - this.buckets.size(); //Minus
-      // END_OF_BUCKET elements.
       if (QueryMonitor.isLowMemory()) {
         String reason = LocalizedStrings.QueryMonitor_LOW_MEMORY_CANCELED_QUERY
             .toLocalizedString(QueryMonitor.getMemoryUsedDuringLowMemory());
         throw new QueryExecutionLowMemoryException(reason);
       }
-      super.operateOnPartitionedRegion(dm, r, startTime);
+      super.operateOnPartitionedRegion(dm, pr, startTime);
     } finally {
-      // remove trace info so that it is not included in the num results when
-      // logged
+      // remove trace info so that it is not included in the num results when logged
       if (isQueryTraced) {
-        resultCollector.remove(queryTraceList);
+        this.resultCollector.remove(queryTraceList);
       }
-      DefaultQuery.setPdxReadSerialized(r.getCache(), false);
+      DefaultQuery.setPdxReadSerialized(pr.getCache(), false);
       query.setRemoteQuery(false);
       query.endTrace(indexObserver, traceStartTime, this.resultCollector);
     }
-    // }
-    // else {
-    // l.warning(LocalizedStrings.QueryMessage_QUERYMESSAGE_DATA_STORE_NOT_CONFIGURED_FOR_THIS_MEMBER);
-    // }
 
     // Unless there was an exception thrown, this message handles sending the response
     return false;
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; query=").append(this.queryString).append("; bucketids=").append(this.buckets);
   }
 
+  @Override
   public int getDSFID() {
     return PR_QUERY_MESSAGE;
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
index f4f6299..296389f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveAllPRMessage.java
@@ -67,7 +67,6 @@ import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
 import org.apache.geode.internal.cache.tier.sockets.VersionedObjectList;
 import org.apache.geode.internal.cache.versions.ConcurrentCacheModificationException;
 import org.apache.geode.internal.cache.versions.VersionTag;
-import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LogMarker;
 import org.apache.geode.internal.offheap.annotations.Released;
@@ -632,7 +631,7 @@ public final class RemoveAllPRMessage extends PartitionMessageWithDirectReply {
 
 
   @Override
-  protected final void appendFields(StringBuffer buff) {
+  protected final void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; removeAllPRDataSize=").append(removeAllPRDataSize).append("; bucketId=")
         .append(bucketId);

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessage.java
index d7699ee..6336841 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RemoveBucketMessage.java
@@ -116,7 +116,7 @@ public class RemoveBucketMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketId=").append(this.bucketId);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/SizeMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/SizeMessage.java b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/SizeMessage.java
index 7e371f9..3dc5217 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/SizeMessage.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/SizeMessage.java
@@ -185,7 +185,7 @@ public final class SizeMessage extends PartitionMessage {
   }
 
   @Override
-  protected void appendFields(StringBuffer buff) {
+  protected void appendFields(StringBuilder buff) {
     super.appendFields(buff);
     buff.append("; bucketIds=").append(this.bucketIds);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
index d2672df..8e39e18 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupManager.java
@@ -16,6 +16,7 @@ package org.apache.geode.internal.cache.persistence;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.geode.InternalGemFireError;
+import org.apache.geode.cache.DiskStore;
 import org.apache.geode.cache.persistence.PersistentID;
 import org.apache.geode.distributed.DistributedSystem;
 import org.apache.geode.distributed.internal.DM;
@@ -81,9 +82,9 @@ public class BackupManager implements MembershipListener {
   private void cleanup() {
     isCancelled = true;
     allowDestroys.countDown();
-    Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned();
-    for (DiskStoreImpl store : diskStores) {
-      store.releaseBackupLock();
+    Collection<DiskStore> diskStores = cache.listDiskStoresIncludingRegionOwned();
+    for (DiskStore store : diskStores) {
+      ((DiskStoreImpl) store).releaseBackupLock();
     }
     final DM distributionManager = cache.getInternalDistributedSystem().getDistributionManager();
     distributionManager.removeAllMembershipListener(this);
@@ -92,12 +93,13 @@ public class BackupManager implements MembershipListener {
 
   public HashSet<PersistentID> prepareBackup() {
     HashSet<PersistentID> persistentIds = new HashSet<PersistentID>();
-    Collection<DiskStoreImpl> diskStores = cache.listDiskStoresIncludingRegionOwned();
-    for (DiskStoreImpl store : diskStores) {
-      store.lockStoreBeforeBackup();
-      if (store.hasPersistedData()) {
-        persistentIds.add(store.getPersistentID());
-        store.getStats().startBackup();
+    Collection<DiskStore> diskStores = cache.listDiskStoresIncludingRegionOwned();
+    for (DiskStore store : diskStores) {
+      DiskStoreImpl storeImpl = (DiskStoreImpl) store;
+      storeImpl.lockStoreBeforeBackup();
+      if (storeImpl.hasPersistedData()) {
+        persistentIds.add(storeImpl.getPersistentID());
+        storeImpl.getStats().startBackup();
       }
     }
     return persistentIds;
@@ -116,9 +118,10 @@ public class BackupManager implements MembershipListener {
     /*
      * Find the first matching DiskStoreId directory for this member.
      */
-    for (DiskStoreImpl diskStore : cache.listDiskStoresIncludingRegionOwned()) {
+    for (DiskStore diskStore : cache.listDiskStoresIncludingRegionOwned()) {
       File[] matchingFiles = baselineParentDir.listFiles(new FilenameFilter() {
-        Pattern pattern = Pattern.compile(".*" + diskStore.getBackupDirName() + "$");
+        Pattern pattern =
+            Pattern.compile(".*" + ((DiskStoreImpl) diskStore).getBackupDirName() + "$");
 
         public boolean accept(File dir, String name) {
           Matcher m = pattern.matcher(name);
@@ -142,7 +145,6 @@ public class BackupManager implements MembershipListener {
    *        option. May be null if the user specified a full backup.
    * @return null if the backup is to be a full backup otherwise return the data store directory in
    *         the previous backup for this member (if incremental).
-   * @throws IOException
    */
   private File checkBaseline(File baselineParentDir) throws IOException {
     File baselineDir = null;
@@ -188,12 +190,12 @@ public class BackupManager implements MembershipListener {
       File storesDir = new File(backupDir, DATA_STORES);
       RestoreScript restoreScript = new RestoreScript();
       HashSet<PersistentID> persistentIds = new HashSet<PersistentID>();
-      Collection<DiskStoreImpl> diskStores =
-          new ArrayList<DiskStoreImpl>(cache.listDiskStoresIncludingRegionOwned());
+      Collection<DiskStore> diskStores =
+          new ArrayList<DiskStore>(cache.listDiskStoresIncludingRegionOwned());
 
       boolean foundPersistentData = false;
-      for (Iterator<DiskStoreImpl> itr = diskStores.iterator(); itr.hasNext();) {
-        DiskStoreImpl store = itr.next();
+      for (Iterator<DiskStore> itr = diskStores.iterator(); itr.hasNext();) {
+        DiskStoreImpl store = (DiskStoreImpl) itr.next();
         if (store.hasPersistedData()) {
           if (!foundPersistentData) {
             createBackupDir(backupDir);
@@ -210,10 +212,11 @@ public class BackupManager implements MembershipListener {
 
       allowDestroys.countDown();
 
-      for (DiskStoreImpl store : diskStores) {
-        store.finishBackup(this);
-        store.getStats().endBackup();
-        persistentIds.add(store.getPersistentID());
+      for (DiskStore store : diskStores) {
+        DiskStoreImpl storeImpl = (DiskStoreImpl) store;
+        storeImpl.finishBackup(this);
+        storeImpl.getStats().endBackup();
+        persistentIds.add(storeImpl.getPersistentID());
       }
 
       if (foundPersistentData) {
@@ -330,10 +333,7 @@ public class BackupManager implements MembershipListener {
         cache.getInternalDistributedSystem().getDistributedMember();
     String vmId = memberId.toString();
     vmId = cleanSpecialCharacters(vmId);
-    File backupDir = new File(targetDir, vmId);
-
-
-    return backupDir;
+    return new File(targetDir, vmId);
   }
 
   private void createBackupDir(File backupDir) throws IOException {

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
index f67dd81..86b2466 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteFunction66.java
@@ -24,6 +24,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.cache.LowMemoryException;
+import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionContext;
 import org.apache.geode.cache.execute.FunctionException;
@@ -32,7 +33,6 @@ import org.apache.geode.cache.operations.ExecuteFunctionOperationContext;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
@@ -96,7 +96,7 @@ public class ExecuteFunction66 extends BaseCommand {
     boolean isReexecute = false;
     boolean allMembers = false;
     boolean ignoreFailedMembers = false;
-    int functionTimeout = GemFireCacheImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
+    int functionTimeout = ConnectionImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
     try {
       byte[] bytes = msg.getPart(0).getSerializedForm();
       functionState = bytes[0];

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java
index ade0aca..0ed7235 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunction66.java
@@ -19,6 +19,7 @@ import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.client.internal.ExecuteFunctionHelper;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionException;
@@ -28,7 +29,6 @@ import org.apache.geode.cache.operations.ExecuteFunctionOperationContext;
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.DistributedRegion;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.execute.AbstractExecution;
 import org.apache.geode.internal.cache.execute.DistributedRegionFunctionExecutor;
@@ -78,7 +78,7 @@ public class ExecuteRegionFunction66 extends BaseCommand {
     int filterSize = 0, partNumber = 0;
     CachedRegionHelper crHelper = servConn.getCachedRegionHelper();
     byte functionState = 0;
-    int functionTimeout = GemFireCacheImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
+    int functionTimeout = ConnectionImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
     try {
       byte[] bytes = msg.getPart(0).getSerializedForm();
       functionState = bytes[0];

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunctionSingleHop.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunctionSingleHop.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunctionSingleHop.java
index 792b1ff..8b2cf75 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunctionSingleHop.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/command/ExecuteRegionFunctionSingleHop.java
@@ -20,13 +20,13 @@ import java.util.NoSuchElementException;
 import java.util.Set;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.cache.client.internal.ConnectionImpl;
 import org.apache.geode.cache.execute.Function;
 import org.apache.geode.cache.execute.FunctionException;
 import org.apache.geode.cache.execute.FunctionInvocationTargetException;
 import org.apache.geode.cache.execute.FunctionService;
 import org.apache.geode.cache.operations.ExecuteFunctionOperationContext;
 import org.apache.geode.internal.Version;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.execute.AbstractExecution;
 import org.apache.geode.internal.cache.execute.InternalFunctionInvocationTargetException;
@@ -77,7 +77,7 @@ public class ExecuteRegionFunctionSingleHop extends BaseCommand {
     Set<Object> removedNodesSet = null;
     int filterSize = 0, bucketIdsSize = 0, partNumber = 0;
     CachedRegionHelper crHelper = servConn.getCachedRegionHelper();
-    int functionTimeout = GemFireCacheImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
+    int functionTimeout = ConnectionImpl.DEFAULT_CLIENT_FUNCTION_TIMEOUT;
     try {
       byte[] bytes = msg.getPart(0).getSerializedForm();
       functionState = bytes[0];

http://git-wip-us.apache.org/repos/asf/geode/blob/dc820690/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
index ab3b3cf..832391d 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
@@ -292,7 +292,7 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi
     this.getSenderAdvisor().setIsPrimary(isPrimary);
   }
 
-  public Cache getCache() {
+  public InternalCache getCache() {
     return this.cache;
   }
 


Mime
View raw message