Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7AF4119C16 for ; Wed, 16 Mar 2016 17:42:27 +0000 (UTC) Received: (qmail 65333 invoked by uid 500); 16 Mar 2016 17:42:27 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 65297 invoked by uid 500); 16 Mar 2016 17:42:27 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 65288 invoked by uid 99); 16 Mar 2016 17:42:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2016 17:42:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D8E04C0316 for ; Wed, 16 Mar 2016 17:42:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0Ac6S7ncklDz for ; Wed, 16 Mar 2016 17:42:25 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id B64585FB8F for ; Wed, 16 Mar 2016 17:42:24 +0000 (UTC) Received: (qmail 65278 invoked by uid 99); 16 Mar 2016 17:42:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2016 17:42:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7C4A2DFB8A; Wed, 16 Mar 2016 17:42:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sai_boorlagadda@apache.org To: commits@geode.incubator.apache.org Message-Id: <7fb5b7aec80747c0be1a960f86d60f8e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-geode git commit: fixed review comments Date: Wed, 16 Mar 2016 17:42:23 +0000 (UTC) Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1096 2407a76f7 -> 8d510910d fixed review comments Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8d510910 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8d510910 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8d510910 Branch: refs/heads/feature/GEODE-1096 Commit: 8d510910db64b836ce2fe9f1fc4cbd7e8394a834 Parents: 2407a76 Author: Sai Boorlagadda Authored: Wed Mar 16 10:42:08 2016 -0700 Committer: Sai Boorlagadda Committed: Wed Mar 16 10:42:08 2016 -0700 ---------------------------------------------------------------------- .../internal/cache/control/HeapMemoryMonitor.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8d510910/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java index 2ec3a99..1a3b113 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java @@ -385,11 +385,7 @@ public void stopMonitoring() { this.thresholds = new MemoryThresholds(this.thresholds.getMaxMemoryBytes(), criticalThreshold, this.thresholds .getEvictionThreshold()); - if (testBytesUsedForThresholdSet != -1) { - updateStateAndSendEvent(testBytesUsedForThresholdSet); - } else { - updateStateAndSendEvent(getBytesUsed()); - } + updateStateAndSendEvent(); // Start or stop monitoring based upon whether a threshold has been set if (this.thresholds.isEvictionThresholdEnabled() || this.thresholds.isCriticalThresholdEnabled()) { @@ -437,11 +433,7 @@ public void stopMonitoring() { this.thresholds = new MemoryThresholds(this.thresholds.getMaxMemoryBytes(), this.thresholds.getCriticalThreshold(), evictionThreshold); - if (testBytesUsedForThresholdSet != -1) { - updateStateAndSendEvent(testBytesUsedForThresholdSet); - } else { - updateStateAndSendEvent(getBytesUsed()); - } + updateStateAndSendEvent(); // Start or stop monitoring based upon whether a threshold has been set if (this.thresholds.isEvictionThresholdEnabled() || this.thresholds.isCriticalThresholdEnabled()) { @@ -463,7 +455,7 @@ public void stopMonitoring() { * If necessary, change the state and send an event for the state change. */ public void updateStateAndSendEvent() { - updateStateAndSendEvent(testBytesUsedForThresholdSet > 0 ? testBytesUsedForThresholdSet : getBytesUsed()); + updateStateAndSendEvent(testBytesUsedForThresholdSet > -1 ? testBytesUsedForThresholdSet : getBytesUsed()); } /**