NOTE: A call to this method that returns true should always be matched with a call to {@link #releasePutFromLoadLock(Object)}.
true
false
104105106107108109110111112113114
transactional ? tm : null, PutFromLoadValidator.NAKED_PUT_INVALIDATION_PERIOD); if (transactional) { tm.begin(); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
142143144145146147148149150151152
if (transactional) { tm.begin(); } testee.registerPendingPut(KEY1); boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
193194195196197198199200201202203
try { if (transactional) { tm.begin(); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertFalse(lockable); } finally { if (lockable) {
246247248249250251252253254255256
300301302303304305306307308309310
testee.invalidateRegion(); } else { testee.invalidateKey(KEY1); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertFalse(lockable); } finally { if (lockable) {
352353354355356357358359360361362
if (transactional) { tm.begin(); } Thread.sleep(110); boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
400401402403404405406407408409410
tm.begin(); } testee.registerPendingPut(KEY1); registeredLatch.countDown(); registeredLatch.await(5, TimeUnit.SECONDS); if (testee.acquirePutFromLoadLock(KEY1)) { try { log.trace("Put from load lock acquired for key = " + KEY1); success.incrementAndGet(); } finally {
511512513514515516517518519520521
final AtomicReference<Object> cache = new AtomicReference<Object>("INITIAL"); Callable<Boolean> pferCallable = new Callable<Boolean>() { public Boolean call() throws Exception { testee.registerPendingPut(KEY1); if (testee.acquirePutFromLoadLock(KEY1)) { try { removeLatch.countDown(); pferLatch.await(); cache.set("PFER"); return Boolean.TRUE;