You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sa...@apache.org on 2016/03/16 18:42:23 UTC
incubator-geode git commit: fixed review comments
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 <sb...@pivotal.io>
Authored: Wed Mar 16 10:42:08 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
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());
}
/**