602603604605606607608609610611612
public void run() { ILock lock = instance2.getLock(key); ICondition condition = lock.newCondition(conditionName); lock.lock(); try { condition.await(); } catch (InterruptedException e) { e.printStackTrace(); } finally { lock.unlock(); }
646647648649650651652653654655656
} }).start(); lock.lock(); latch.countDown(); condition.await(); lock.unlock(); } @Test(timeout = 60000, expected = HazelcastInstanceNotActiveException.class) public void testShutDownNode_whenOtherWaitingOnConditionAwait() throws InterruptedException {
675676677678679680681682683684685
}).start(); lock.lock(); try { latch.countDown(); condition.await(); } catch (InterruptedException e) { } lock.unlock(); }
706707708709710711712713714715716
new Thread(new Runnable() { public void run() { lock.lock(); try { awaitLatch.countDown(); condition.await(); if (lock.isLockedByCurrentThread()) { count.incrementAndGet(); } } catch (InterruptedException ignored) { } finally {