/** * Locally invalidate a key in region REGION_NAME. The keys to locally invalidate are specified in * keyIntervals. * * @return true if all keys to be locally invalidated have been completed. */ protected boolean localInvalidate() { SharedCounters sc = CQUtilBB.getBB().getSharedCounters(); long nextKey = sc.incrementAndRead(CQUtilBB.LASTKEY_LOCAL_INVALIDATE); if (!keyIntervals.keyInRange(KeyIntervals.LOCAL_INVALIDATE, nextKey)) { Log.getLogWriter().info("All local invalidates completed; returning from localInvalidate"); return true; } Object key = NameFactory.getObjectNameForCounter(nextKey); Log.getLogWriter().info("Locally invalidating " + key); try { checkContainsValueForKey(key, true, "before localInvalidate"); aRegion.localInvalidate(key); Log.getLogWriter() .info( "Done locally invalidating " + key + ", num remaining: " + (keyIntervals.getLastKey(KeyIntervals.LOCAL_INVALIDATE) - nextKey)); } catch (EntryNotFoundException e) { throw new TestException(TestHelper.getStackTrace(e)); } return (nextKey >= keyIntervals.getLastKey(KeyIntervals.LOCAL_INVALIDATE)); }