You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2019/08/14 21:28:24 UTC

[geode] 02/02: Cache system property statically.

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

jbarrett pushed a commit to branch spike/slow-functions
in repository https://gitbox.apache.org/repos/asf/geode.git

commit b90ce6f1e328ca8b551eace7b7491a02f2565242
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Wed Aug 14 14:28:03 2019 -0700

    Cache system property statically.
---
 .../apache/geode/internal/cache/execute/AbstractExecution.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
index bafd555..d98ec8a 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/execute/AbstractExecution.java
@@ -51,12 +51,13 @@ import org.apache.geode.internal.logging.LogService;
  *
  */
 public abstract class AbstractExecution implements InternalExecution {
+  private static final Logger logger = LogService.getLogger();
 
   public static final int DEFAULT_CLIENT_FUNCTION_TIMEOUT = 0;
   private static final String CLIENT_FUNCTION_TIMEOUT_SYSTEM_PROPERTY =
       DistributionConfig.GEMFIRE_PREFIX + "CLIENT_FUNCTION_TIMEOUT";
-
-  private static final Logger logger = LogService.getLogger();
+  private static final Integer timeoutMsSystemProperty =
+      Integer.getInteger(CLIENT_FUNCTION_TIMEOUT_SYSTEM_PROPERTY, DEFAULT_CLIENT_FUNCTION_TIMEOUT);
 
   boolean isMemberMappedArgument;
 
@@ -158,9 +159,8 @@ public abstract class AbstractExecution implements InternalExecution {
   }
 
   protected AbstractExecution() {
-    final int timeoutMs = Integer.getInteger(CLIENT_FUNCTION_TIMEOUT_SYSTEM_PROPERTY,
-        DEFAULT_CLIENT_FUNCTION_TIMEOUT);
-    this.timeoutMs = timeoutMs >= 0 ? timeoutMs : DEFAULT_CLIENT_FUNCTION_TIMEOUT;
+    timeoutMs =
+        timeoutMsSystemProperty >= 0 ? timeoutMsSystemProperty : DEFAULT_CLIENT_FUNCTION_TIMEOUT;
   }
 
   protected AbstractExecution(AbstractExecution ae) {