NOTE: A call to this method that returns true should always be matched with a call to {@link #releasePutFromLoadLock(Object)}.
true
false
90919293949596979899100
transactional ? tm : null); if (transactional) { tm.begin(); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
117118119120121122123124125126127
if (transactional) { tm.begin(); } testee.registerPendingPut(KEY1); boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
157158159160161162163164165166167
} if (transactional) { tm.begin(); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertFalse(lockable); } finally { if (lockable) {
201202203204205206207208209210211
245246247248249250251252253254255
testee.invalidateRegion(); } else { testee.invalidateKey(KEY1); } boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertFalse(lockable); } finally { if (lockable) {
288289290291292293294295296297298
if (transactional) { tm.begin(); } Thread.sleep(110); boolean lockable = testee.acquirePutFromLoadLock(KEY1); try { assertTrue(lockable); } finally { if (lockable) {
324325326327328329330331332333334
tm.begin(); } testee.registerPendingPut(KEY1); registeredLatch.countDown(); registeredLatch.await(5, TimeUnit.SECONDS); if (testee.acquirePutFromLoadLock(KEY1)) { try { success.incrementAndGet(); } finally { testee.releasePutFromLoadLock(KEY1);
507508509510511512513514515516517
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;