+ return;
+ }
+
+ LOG.debug("Data store {} is now ready", identifier);
+ }
+
+ @Beta
+ @Deprecated
+ public boolean awaitReadiness() throws InterruptedException {
+ return awaitReadiness(initialSettleTime());
+ }
+
+ @Beta
+ @Deprecated
+ public boolean awaitReadiness(final Duration toWait) throws InterruptedException {
+ try {
+ if (toWait.isFinite()) {
+ try {
+ readinessFuture.get(toWait.toNanos(), TimeUnit.NANOSECONDS);
+ } catch (TimeoutException e) {
+ LOG.debug("Timed out waiting for shards to settle", e);
+ return false;
+ }
+ } else {
+ readinessFuture.get();
+ }
+ } catch (ExecutionException e) {
+ LOG.warn("Unexpected readiness failure, assuming convergence", e);
+ }
+
+ return true;
+ }
+
+ @Beta
+ @Deprecated
+ public void awaitReadiness(final long timeout, final TimeUnit unit) throws InterruptedException, TimeoutException {
+ if (!awaitReadiness(Duration.create(timeout, unit))) {
+ throw new TimeoutException("Shard leaders failed to settle");