geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [24/54] geode git commit: GEODE-2632: change dependencies on GemFireCacheImpl to InternalCache
Date Thu, 04 May 2017 00:07:38 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteCacheInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteCacheInfo.java
b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteCacheInfo.java
index bcce322..59be343 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteCacheInfo.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteCacheInfo.java
@@ -14,6 +14,15 @@
  */
 package org.apache.geode.internal.admin.remote;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
 import org.apache.geode.DataSerializable;
 import org.apache.geode.DataSerializer;
 import org.apache.geode.cache.CacheRuntimeException;
@@ -22,16 +31,9 @@ import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.admin.CacheInfo;
 import org.apache.geode.internal.admin.StatResource;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.*;
-
-// import org.apache.geode.internal.*;
-
 /**
  * This class is an implementation of the {@link CacheInfo} interface.
  */
@@ -54,14 +56,14 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
   /** Is this is a cache server? */
   private boolean isServer;
 
-  public RemoteCacheInfo(GemFireCacheImpl c) {
-    this.name = c.getName();
-    this.id = System.identityHashCode(c);
-    this.closed = c.isClosed();
-    this.lockTimeout = c.getLockTimeout();
-    this.lockLease = c.getLockLease();
-    this.searchTimeout = c.getSearchTimeout();
-    this.upTime = c.getUpTime();
+  public RemoteCacheInfo(InternalCache internalCache) {
+    this.name = internalCache.getName();
+    this.id = System.identityHashCode(internalCache);
+    this.closed = internalCache.isClosed();
+    this.lockTimeout = internalCache.getLockTimeout();
+    this.lockLease = internalCache.getLockLease();
+    this.searchTimeout = internalCache.getSearchTimeout();
+    this.upTime = internalCache.getUpTime();
     if (this.closed) {
       this.rootRegionNames = null;
       this.perfStats = null;
@@ -71,16 +73,15 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
       try {
         final Set roots;
         if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
-          roots = c.rootRegions();
+          roots = internalCache.rootRegions();
         } else {
-          roots = c.rootRegions(true);
+          roots = internalCache.rootRegions(true);
         }
 
         String[] rootNames = new String[roots.size()];
         int idx = 0;
-        Iterator it = roots.iterator();
-        while (it.hasNext()) {
-          Region r = (Region) it.next();
+        for (Object root : roots) {
+          Region r = (Region) root;
           rootNames[idx] = r.getName();
           idx++;
         }
@@ -88,28 +89,30 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
       } catch (CacheRuntimeException ignore) {
         this.rootRegionNames = null;
       }
-      this.perfStats = new RemoteStatResource(c.getCachePerfStats().getStats());
+      this.perfStats = new RemoteStatResource(internalCache.getCachePerfStats().getStats());
 
       // Note that since this is only a snapshot, so no synchronization
       // on allBridgeServersLock is needed.
-      Collection bridges = c.getCacheServers();
+      Collection<CacheServer> bridges = internalCache.getCacheServers();
       this.bridgeServerIds = new int[bridges.size()];
-      Iterator iter = bridges.iterator();
+      Iterator<CacheServer> iter = bridges.iterator();
       for (int i = 0; iter.hasNext(); i++) {
-        CacheServer bridge = (CacheServer) iter.next();
+        CacheServer bridge = iter.next();
         this.bridgeServerIds[i] = System.identityHashCode(bridge);
       }
 
-      this.isServer = c.isServer();
+      this.isServer = internalCache.isServer();
     }
   }
 
   /**
    * For use only by DataExternalizable mechanism
    */
-  public RemoteCacheInfo() {}
-
+  public RemoteCacheInfo() {
+    // do nothing
+  }
 
+  @Override
   public void toData(DataOutput out) throws IOException {
     DataSerializer.writeString(this.name, out);
     out.writeInt(this.id);
@@ -124,6 +127,7 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
     out.writeBoolean(this.isServer);
   }
 
+  @Override
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     this.name = DataSerializer.readString(in);
     this.id = in.readInt();
@@ -139,34 +143,42 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable
{
   }
 
   // CacheInfo interface methods
+  @Override
   public String getName() {
     return this.name;
   }
 
+  @Override
   public int getId() {
     return this.id;
   }
 
+  @Override
   public boolean isClosed() {
     return this.closed;
   }
 
+  @Override
   public int getLockTimeout() {
     return this.lockTimeout;
   }
 
+  @Override
   public int getLockLease() {
     return this.lockLease;
   }
 
+  @Override
   public int getSearchTimeout() {
     return this.searchTimeout;
   }
 
+  @Override
   public int getUpTime() {
     return this.upTime;
   }
 
+  @Override
   public synchronized Set getRootRegionNames() {
     if (this.rootRegionNames == null) {
       return null;
@@ -175,19 +187,23 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable
{
     }
   }
 
+  @Override
   public StatResource getPerfStats() {
     return this.perfStats;
   }
 
+  @Override
   public synchronized void setClosed() {
     this.closed = true;
     this.rootRegionNames = null;
   }
 
+  @Override
   public int[] getBridgeServerIds() {
     return this.bridgeServerIds;
   }
 
+  @Override
   public boolean isServer() {
     return this.isServer;
   }
@@ -203,6 +219,6 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
   @Override
   public String toString() {
     return LocalizedStrings.RemoteCacheInfo_INFORMATION_ABOUT_THE_CACHE_0_WITH_1_BRIDGE_SERVERS
-        .toLocalizedString(new Object[] {this.name, Integer.valueOf(this.bridgeServerIds.length)});
+        .toLocalizedString(this.name, this.bridgeServerIds.length);
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RevokePersistentIDRequest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RevokePersistentIDRequest.java
b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RevokePersistentIDRequest.java
index 14c3ac2..5a47354 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RevokePersistentIDRequest.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RevokePersistentIDRequest.java
@@ -19,27 +19,32 @@ import java.io.DataOutput;
 import java.io.IOException;
 import java.util.Set;
 
+import org.apache.logging.log4j.Logger;
+
 import org.apache.geode.CancelException;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.ReplyException;
 import org.apache.geode.internal.InternalDataSerializer;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.persistence.PersistentMemberManager;
 import org.apache.geode.internal.cache.persistence.PersistentMemberPattern;
+import org.apache.geode.internal.logging.LogService;
 
 /**
  * An instruction to all members that they should forget about the persistent member described
by
  * this pattern. TODO prpersist - This extends AdminRequest, but it doesn't work with most
of the
  * admin paradigm, which is a request response to a single member. Maybe we need to a new
base
  * class.
- *
  */
 public class RevokePersistentIDRequest extends CliLegacyMessage {
-  PersistentMemberPattern pattern;
+  private static final Logger logger = LogService.getLogger();
 
-  public RevokePersistentIDRequest() {
+  private PersistentMemberPattern pattern;
 
+  public RevokePersistentIDRequest() {
+    // do nothing
   }
 
   public RevokePersistentIDRequest(PersistentMemberPattern pattern) {
@@ -63,22 +68,23 @@ public class RevokePersistentIDRequest extends CliLegacyMessage {
       }
       throw e;
     } catch (InterruptedException e) {
-      e.printStackTrace();
+      logger.warn(e);
     }
     request.createResponse((DistributionManager) dm);
   }
 
   @Override
   protected AdminResponse createResponse(DistributionManager dm) {
-    GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
+    InternalCache cache = GemFireCacheImpl.getInstance();
     if (cache != null && !cache.isClosed()) {
       PersistentMemberManager mm = cache.getPersistentMemberManager();
-      mm.revokeMember(pattern);
+      mm.revokeMember(this.pattern);
     }
 
     return new RevokePersistentIDResponse(this.getSender());
   }
 
+  @Override
   public int getDSFID() {
     return REVOKE_PERSISTENT_ID_REQUEST;
   }
@@ -86,14 +92,13 @@ public class RevokePersistentIDRequest extends CliLegacyMessage {
   @Override
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     super.fromData(in);
-    pattern = new PersistentMemberPattern();
-    InternalDataSerializer.invokeFromData(pattern, in);
+    this.pattern = new PersistentMemberPattern();
+    InternalDataSerializer.invokeFromData(this.pattern, in);
   }
 
   @Override
   public void toData(DataOutput out) throws IOException {
     super.toData(out);
-    InternalDataSerializer.invokeToData(pattern, out);
+    InternalDataSerializer.invokeToData(this.pattern, out);
   }
-
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RootRegionResponse.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RootRegionResponse.java
b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RootRegionResponse.java
index 5255292..78ac174 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RootRegionResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RootRegionResponse.java
@@ -12,61 +12,53 @@
  * or implied. See the License for the specific language governing permissions and limitations
under
  * the License.
  */
-
-
 package org.apache.geode.internal.admin.remote;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.apache.geode.CancelException;
 import org.apache.geode.DataSerializer;
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.Region;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.admin.GemFireVM;
-import org.apache.geode.internal.cache.GemFireCacheImpl;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-// import org.apache.geode.internal.*;
+import org.apache.geode.internal.cache.InternalCache;
 
 /**
  * Responds to {@link RootRegionResponse}.
  */
 public final class RootRegionResponse extends AdminResponse {
-  // instance variables
-  // private boolean hasRoot = false;
+
   private String[] regions;
   private String[] userAttrs;
 
   /**
-   * Returns a <code>RootRegionResponse</code> that will be returned to the specified
recipient. The
+   * Returns a {@code RootRegionResponse} that will be returned to the specified recipient.
The
    * message will contains a copy of the local manager's system config.
    */
   public static RootRegionResponse create(DistributionManager dm,
       InternalDistributedMember recipient) {
     RootRegionResponse m = new RootRegionResponse();
     try {
-      Cache cache = CacheFactory.getInstance(dm.getSystem());
+      InternalCache cache = (InternalCache) CacheFactory.getInstance(dm.getSystem());
       final Collection roots;
       if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
         roots = cache.rootRegions();
       } else {
-        roots = ((GemFireCacheImpl) cache).rootRegions(true);
+        roots = cache.rootRegions(true);
       }
 
-
       List regionNames = new ArrayList();
       List userAttributes = new ArrayList();
-      for (Iterator iter = roots.iterator(); iter.hasNext();) {
-        Region r = (Region) iter.next();
+      for (Object root : roots) {
+        Region r = (Region) root;
         regionNames.add(r.getName());
         userAttributes.add(CacheDisplay.getCachedObjectDisplay(r.getUserAttribute(),
             GemFireVM.LIGHTWEIGHT_CACHE_VALUE));
@@ -76,20 +68,19 @@ public final class RootRegionResponse extends AdminResponse {
       m.regions = (String[]) regionNames.toArray(temp);
       m.userAttrs = (String[]) userAttributes.toArray(temp);;
 
-    } catch (CancelException cce) {
-      /* no cache yet */ }
+    } catch (CancelException ignore) {
+      /* no cache yet */
+    }
 
     m.setRecipient(recipient);
     return m;
   }
 
-  // instance methods
-
   public Region[] getRegions(RemoteGemFireVM vm) {
-    if (regions.length > 0) {
-      Region[] roots = new Region[regions.length];
-      for (int i = 0; i < regions.length; i++) {
-        roots[i] = new AdminRegion(regions[i], vm, userAttrs[i]);
+    if (this.regions.length > 0) {
+      Region[] roots = new Region[this.regions.length];
+      for (int i = 0; i < this.regions.length; i++) {
+        roots[i] = new AdminRegion(this.regions[i], vm, this.userAttrs[i]);
       }
       return roots;
     } else {
@@ -97,6 +88,7 @@ public final class RootRegionResponse extends AdminResponse {
     }
   }
 
+  @Override
   public int getDSFID() {
     return ROOT_REGION_RESPONSE;
   }
@@ -104,15 +96,15 @@ public final class RootRegionResponse extends AdminResponse {
   @Override
   public void toData(DataOutput out) throws IOException {
     super.toData(out);
-    DataSerializer.writeObject(regions, out);
-    DataSerializer.writeObject(userAttrs, out);
+    DataSerializer.writeObject(this.regions, out);
+    DataSerializer.writeObject(this.userAttrs, out);
   }
 
   @Override
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     super.fromData(in);
-    regions = (String[]) DataSerializer.readObject(in);
-    userAttrs = (String[]) DataSerializer.readObject(in);
+    this.regions = DataSerializer.readObject(in);
+    this.userAttrs = DataSerializer.readObject(in);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/admin/remote/ShutdownAllRequest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/ShutdownAllRequest.java
b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/ShutdownAllRequest.java
index 979207a..b12f9f2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/ShutdownAllRequest.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/ShutdownAllRequest.java
@@ -14,44 +14,55 @@
  */
 package org.apache.geode.internal.admin.remote;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.apache.logging.log4j.Logger;
+
 import org.apache.geode.CancelException;
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.SystemFailure;
-import org.apache.geode.distributed.internal.*;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.DistributionMessage;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.InternalLocator;
+import org.apache.geode.distributed.internal.ReplyException;
+import org.apache.geode.distributed.internal.ReplyMessage;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
+import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.tcp.ConnectionTable;
-import org.apache.logging.log4j.Logger;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.*;
 
 /**
  * An instruction to all members with cache that their PR should gracefully close and disconnect
DS
- *
  */
 public class ShutdownAllRequest extends AdminRequest {
 
   private static final Logger logger = LogService.getLogger();
 
-  static final long SLEEP_TIME_BEFORE_DISCONNECT_DS = Long
-      .getLong(DistributionConfig.GEMFIRE_PREFIX + "sleep-before-disconnect-ds", 1000).longValue();
+  private static final long SLEEP_TIME_BEFORE_DISCONNECT_DS =
+      Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "sleep-before-disconnect-ds", 1000);
 
-  public ShutdownAllRequest() {}
+  public ShutdownAllRequest() {
+    // do nothing
+  }
 
   /**
    * Sends a shutdownAll request to all other members and performs local shutdownAll processing
in
    * the waitingThreadPool.
    */
   public static Set send(final DM dm, long timeout) {
-
     boolean hadCache = hasCache();
-    boolean interrupted = false;
-    DistributionManager dism =
-        (dm instanceof DistributionManager) ? (DistributionManager) dm : null;
+    DistributionManager dism = dm instanceof DistributionManager ? (DistributionManager)
dm : null;
     InternalDistributedMember myId = dm.getDistributionManagerId();
 
     Set recipients = dm.getOtherNormalDistributionManagerIds();
@@ -59,7 +70,6 @@ public class ShutdownAllRequest extends AdminRequest {
     recipients.remove(myId);
 
     // now do shutdownall
-    // recipients = dm.getOtherNormalDistributionManagerIds();
     ShutdownAllRequest request = new ShutdownAllRequest();
     request.setRecipients(recipients);
 
@@ -84,6 +94,7 @@ public class ShutdownAllRequest extends AdminRequest {
       }
     }
 
+    boolean interrupted = false;
     try {
       if (!replyProcessor.waitForReplies(timeout)) {
         return null;
@@ -92,9 +103,9 @@ public class ShutdownAllRequest extends AdminRequest {
       if (!(e.getCause() instanceof CancelException)) {
         e.handleAsUnexpected();
       }
-    } catch (CancelException e) {
+    } catch (CancelException ignore) {
       // expected
-    } catch (InterruptedException e) {
+    } catch (InterruptedException ignore) {
       interrupted = true;
     }
 
@@ -116,7 +127,7 @@ public class ShutdownAllRequest extends AdminRequest {
 
     try {
       Thread.sleep(3 * SLEEP_TIME_BEFORE_DISCONNECT_DS);
-    } catch (InterruptedException e) {
+    } catch (InterruptedException ignore) {
     }
     return replyProcessor.getResults();
   }
@@ -139,10 +150,11 @@ public class ShutdownAllRequest extends AdminRequest {
       final InternalDistributedSystem ids = dm.getSystem();
       if (ids.isConnected()) {
         Thread t = new Thread(new Runnable() {
+          @Override
           public void run() {
             try {
               Thread.sleep(SLEEP_TIME_BEFORE_DISCONNECT_DS);
-            } catch (InterruptedException e) {
+            } catch (InterruptedException ignore) {
             }
             ConnectionTable.threadWantsSharedResources();
             if (ids.isConnected()) {
@@ -156,19 +168,15 @@ public class ShutdownAllRequest extends AdminRequest {
   }
 
   private static boolean hasCache() {
-    GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
-    if (cache != null && !cache.isClosed()) {
-      return true;
-    } else {
-      return false;
-    }
+    InternalCache cache = GemFireCacheImpl.getInstance();
+    return cache != null && !cache.isClosed();
   }
 
   @Override
   protected AdminResponse createResponse(DistributionManager dm) {
     boolean isToShutdown = hasCache();
-    boolean isSuccess = false;
     if (isToShutdown) {
+      boolean isSuccess = false;
       try {
         GemFireCacheImpl.getInstance().shutDownAll();
         isSuccess = true;
@@ -207,6 +215,7 @@ public class ShutdownAllRequest extends AdminRequest {
     return new ShutdownAllResponse(this.getSender(), isToShutdown);
   }
 
+  @Override
   public int getDSFID() {
     return SHUTDOWN_ALL_REQUEST;
   }
@@ -230,7 +239,7 @@ public class ShutdownAllRequest extends AdminRequest {
   private static class ShutDownAllReplyProcessor extends AdminMultipleReplyProcessor {
     Set results = Collections.synchronizedSet(new TreeSet());
 
-    public ShutDownAllReplyProcessor(DM dm, Collection initMembers) {
+    ShutDownAllReplyProcessor(DM dm, Collection initMembers) {
       super(dm, initMembers);
     }
 
@@ -239,13 +248,9 @@ public class ShutdownAllRequest extends AdminRequest {
       return false;
     }
 
-    /*
+    /**
      * If response arrives, we will save into results and keep wait for member's departure.
If the
      * member is departed before sent response, no wait for its response
-     * 
-     * @see
-     * org.apache.geode.distributed.internal.ReplyProcessor21#process(org.apache.geode.distributed.
-     * internal.DistributionMessage)
      */
     @Override
     public void process(DistributionMessage msg) {
@@ -254,8 +259,8 @@ public class ShutdownAllRequest extends AdminRequest {
       }
       if (msg instanceof ShutdownAllResponse) {
         if (((ShutdownAllResponse) msg).isToShutDown()) {
-          logger.debug("{} adding {} to result set {}", this, msg.getSender(), results);
-          results.add(msg.getSender());
+          logger.debug("{} adding {} to result set {}", this, msg.getSender(), this.results);
+          this.results.add(msg.getSender());
         } else {
           // for member without cache, we will not wait for its result
           // so no need to wait its DS to close either

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
index 60f397c..eacb8fd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractBucketRegionQueue.java
@@ -60,15 +60,14 @@ public abstract class AbstractBucketRegionQueue extends BucketRegion {
    * Holds keys for those events that were not found in BucketRegionQueue during processing
of
    * ParallelQueueRemovalMessage. This can occur due to the scenario mentioned in #49196.
    */
-  private final ConcurrentHashSet<Object> failedBatchRemovalMessageKeys =
-      new ConcurrentHashSet<Object>();
+  private final ConcurrentHashSet<Object> failedBatchRemovalMessageKeys = new ConcurrentHashSet<>();
 
-  public AbstractBucketRegionQueue(String regionName, RegionAttributes attrs,
-      LocalRegion parentRegion, GemFireCacheImpl cache,
-      InternalRegionArguments internalRegionArgs) {
+  AbstractBucketRegionQueue(String regionName, RegionAttributes attrs, LocalRegion parentRegion,
+      InternalCache cache, InternalRegionArguments internalRegionArgs) {
     super(regionName, attrs, parentRegion, cache, internalRegionArgs);
     this.stats = ((AbstractLRURegionMap) getRegionMap()).getLRUStatistics();
-    gatewaySenderStats = this.getPartitionedRegion().getParallelGatewaySender().getStatistics();
+    this.gatewaySenderStats =
+        this.getPartitionedRegion().getParallelGatewaySender().getStatistics();
   }
 
   // Prevent this region from using concurrency checks
@@ -199,7 +198,7 @@ public abstract class AbstractBucketRegionQueue extends BucketRegion {
     }
     @Released
     EntryEventImpl event = getPartitionedRegion().newDestroyEntryEvent(key, null);
-    event.setEventId(new EventID(cache.getSystem()));
+    event.setEventId(new EventID(cache.getInternalDistributedSystem()));
     try {
       event.setRegion(this);
       basicDestroy(event, true, null);

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractCacheServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractCacheServer.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractCacheServer.java
index d575634..0a6c24b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractCacheServer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractCacheServer.java
@@ -14,6 +14,10 @@
  */
 package org.apache.geode.internal.cache;
 
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Set;
+
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.cache.server.ClientSubscriptionConfig;
@@ -28,10 +32,6 @@ import org.apache.geode.management.membership.ClientMembership;
 import org.apache.geode.management.membership.ClientMembershipEvent;
 import org.apache.geode.management.membership.ClientMembershipListener;
 
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Set;
-
 /**
  * Abstract class that contains common code that all true implementations of {@link CacheServer}
can
  * use.

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegionEntry.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegionEntry.java
index b162683..ea2c148 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegionEntry.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractDiskRegionEntry.java
@@ -16,13 +16,7 @@ package org.apache.geode.internal.cache;
 
 import org.apache.geode.internal.cache.wan.GatewaySenderEventImpl;
 import org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderQueue;
-import org.apache.geode.internal.offheap.annotations.Released;
-import org.apache.geode.internal.offheap.annotations.Retained;
 
-/**
- * 
- *
- */
 public abstract class AbstractDiskRegionEntry extends AbstractRegionEntry implements DiskEntry
{
   protected AbstractDiskRegionEntry(RegionEntryContext context, Object value) {
     super(context, value);

http://git-wip-us.apache.org/repos/asf/geode/blob/0d0bf253/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractOplogDiskRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractOplogDiskRegionEntry.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractOplogDiskRegionEntry.java
index 64a1fea..bdaf200 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractOplogDiskRegionEntry.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractOplogDiskRegionEntry.java
@@ -12,7 +12,6 @@
  * or implied. See the License for the specific language governing permissions and limitations
under
  * the License.
  */
-
 package org.apache.geode.internal.cache;
 
 import org.apache.geode.cache.EntryEvent;
@@ -26,10 +25,9 @@ import org.apache.geode.internal.offheap.annotations.Retained;
  * Abstract implementation class of RegionEntry interface. This is adds Disk support behavior
  *
  * @since GemFire 3.5.1
- *
- *
  */
 public abstract class AbstractOplogDiskRegionEntry extends AbstractDiskRegionEntry {
+
   protected AbstractOplogDiskRegionEntry(RegionEntryContext context, Object value) {
     super(context, value);
   }


Mime
View raw message