public Object call() throws Exception { InternalResourceManager irm = ((GemFireCacheImpl) getCache()).getResourceManager(); // Reset CRITICAL_UP by informing all that heap usage is now 1 byte (0 would disable). irm.getHeapMonitor().updateStateAndSendEvent(NORMAL_HEAP_USED); Set<ResourceListener> listeners = irm.getResourceListeners(ResourceType.HEAP_MEMORY); Iterator<ResourceListener> it = listeners.iterator(); while (it.hasNext()) { ResourceListener<MemoryEvent> l = it.next(); if (l instanceof TestMemoryThresholdListener) { ((TestMemoryThresholdListener) l).resetThresholdCalls(); } } irm.setCriticalHeapPercentage(0f); irm.setEvictionHeapPercentage(0f); irm.getHeapMonitor().setTestMaxMemoryBytes(0); HeapMemoryMonitor.setTestDisableMemoryUpdates(false); return null; }