BerkeleyDBClientStore implements ClientRecoveryStore { @Override public synchronized boolean waitingForReclaim() { if (clientRecoveryDatabase == null) { return false; } Transaction tx = env.beginTransaction(null, null); try (Cursor cursor = clientRecoveryDatabase.openCursor(tx, config)) { DatabaseEntry key = new DatabaseEntry(); DatabaseEntry data = new DatabaseEntry(); while (cursor.getNext(key, data, null) == OperationStatus.SUCCESS) { Instant clientCreationTime = Instant.ofEpochMilli(LongBinding.entryToLong(data)); if (clientCreationTime.isBefore(bootTime)) { LOGGER.debug("Recovery: wating for client [{}] at {}", new String(key.getData(), UTF_8), clientCreationTime); return true; } } return false; } finally { tx.commit(); } } BerkeleyDBClientStore(File dir);  BerkeleyDBClientStore(File dir, Properties properties); @Override synchronized void addClient(byte[] client); @Override synchronized void removeClient(byte[] client); @Override synchronized void reclaimClient(byte[] client); @Override synchronized void wantReclaim(byte[] client); @Override synchronized boolean waitingForReclaim(); @Override synchronized void reclaimComplete(); @Override synchronized void close();  }
@Test public void shouldNotWaitForClientsOnFirstStart() { givenServer(); assertFalse(clientRecoveryStore.waitingForReclaim()); }