280281282283284285286287288289290
@Override public void failed(BabuDBException error, Object context) { if (notReady.decrementAndGet() == 0) { synchronized (notReady) { notReady.notify(); } } fail("This should not happen."); } });
220221222223224225226227228229230
// notify, if the last chunk was inserted synchronized (openChunks) { if (openChunks.get() != -1 && openChunks. decrementAndGet() == 0) openChunks.notify(); } } @Override public void requestFailed(Exception e) {
239240241242243244245246247248249
fileName, pos1, e.getMessage()); } synchronized (openChunks) { openChunks.set(-1); openChunks.notify(); } } }); } }
134135136137138139140141142143144
@Override public void finished(Object result, Object context) { synchronized (count) { if (count.decrementAndGet() == 0) count.notify(); } } @Override public void failed(BabuDBException error, Object context) {
143144145146147148149150151152153
@Override public void failed(BabuDBException error, Object context) { Logging.logError(Logging.LEVEL_ERROR, stage, error); synchronized (count) { count.set(-1); count.notify(); } } }); } finally { this.checksum.reset();
7374757677787980818283
createdLedgers.add(ledgerId); } synchronized (expected) { int num = expected.decrementAndGet(); if (num == 0) { expected.notify(); } } } }); }
172173174175176177178179180181182
getJmsConsumer().setMessageListener(new MessageListener() { public void onMessage(Message msg) { incThroughput(); recvCount.incrementAndGet(); synchronized (recvCount) { recvCount.notify(); } try { commitTxIfNecessary(); } catch (JMSException ex) {
7475767778798081828384
session.createReceiver(queue); connection.start(); if (count.incrementAndGet() >= number) { synchronized (count) { count.notify(); } } } catch (Exception ex) { ex.printStackTrace(); }
6768697071727374757677
6869707172737475767778
} } synchronized (expected) { int num = expected.decrementAndGet(); if (num == 0) { expected.notify(); } } } }, new LedgerMetadata(1, 1)); }