This is an automated email from the ASF dual-hosted git repository.

pivotalsarge pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 595da56  GEODE-4644: Move static to member of distributed system. 
(#1734)
595da56 is described below

commit 595da5633915901f74d52ad1c631a5426225d5a0
Author: Michael "Sarge" Dodge <mdo...@pivotal.io>
AuthorDate: Wed Apr 4 14:51:47 2018 -0700

    GEODE-4644: Move static to member of distributed system. (#1734)
---
 .../cache/client/internal/ClientSideHandshakeImpl.java    | 13 +------------
 .../distributed/internal/InternalDistributedSystem.java   | 15 +++++++++++++++
 .../java/org/apache/geode/internal/cache/LocalRegion.java |  2 +-
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImpl.java
 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImpl.java
index 34e0847..0f4aa4e 100644
--- 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientSideHandshakeImpl.java
@@ -71,13 +71,6 @@ import org.apache.geode.security.GemFireSecurityException;
 
 public class ClientSideHandshakeImpl extends Handshake implements 
ClientSideHandshake {
   /**
-   * Used at client side, indicates whether the 'delta-propagation' property 
is enabled on the DS
-   * this client is connected to. This variable is used to decide whether to 
send delta bytes or
-   * full value to the server for a delta-update operation.
-   */
-  private static boolean deltaEnabledOnServer = true;
-
-  /**
    * If true, the client has configured multi-user security, meaning that each 
thread holds its own
    * security principal.
    */
@@ -95,10 +88,6 @@ public class ClientSideHandshakeImpl extends Handshake 
implements ClientSideHand
     return replyCode;
   }
 
-  public static boolean isDeltaEnabledOnServer() {
-    return deltaEnabledOnServer;
-  }
-
   public ClientSideHandshakeImpl(ClientProxyMembershipID proxyId,
       InternalDistributedSystem distributedSystem, SecurityService 
securityService,
       boolean multiuserSecureMode) {
@@ -245,7 +234,7 @@ public class ClientSideHandshakeImpl extends Handshake 
implements ClientSideHand
       // [sumedh] Static variable below? Client can connect to different
       // DSes with different values of this. It shoule be a member variable.
       if (!communicationMode.isWAN() && 
currentClientVersion.compareTo(Version.GFE_61) >= 0) {
-        deltaEnabledOnServer = dis.readBoolean();
+        ((InternalDistributedSystem) 
system).setDeltaEnabledOnServer(dis.readBoolean());
       }
 
       // validate that the remote side has a different distributed system id.
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index 6a59b92..4992038 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -311,6 +311,21 @@ public class InternalDistributedSystem extends 
DistributedSystem
 
   private volatile SecurityService securityService;
 
+  /**
+   * Used at client side, indicates whether the 'delta-propagation' property 
is enabled on the DS
+   * this client is connected to. This variable is used to decide whether to 
send delta bytes or
+   * full value to the server for a delta-update operation.
+   */
+  private boolean deltaEnabledOnServer = true;
+
+  public boolean isDeltaEnabledOnServer() {
+    return deltaEnabledOnServer;
+  }
+
+  public void setDeltaEnabledOnServer(boolean deltaEnabledOnServer) {
+    this.deltaEnabledOnServer = deltaEnabledOnServer;
+  }
+
   ///////////////////// Static Methods /////////////////////
 
   /**
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 34728cd..2a8813e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -1683,7 +1683,7 @@ public class LocalRegion extends AbstractRegion 
implements LoaderHelperFactory,
           if (!extractDelta && ClientHealthMonitor.getInstance() != null) {
             extractDelta = ClientHealthMonitor.getInstance().hasDeltaClients();
           }
-        } else if (ClientSideHandshakeImpl.isDeltaEnabledOnServer()) {
+        } else if (getSystem().isDeltaEnabledOnServer()) {
           // This is a client region
           extractDelta = true;
         }

-- 
To stop receiving notification emails like this one, please contact
pivotalsa...@apache.org.

Reply via email to