@Override public Discoverable pick() { Discoverable pick = delegate.pick(); try { long count = 0; while (pick == null && count++ < timeout) { timeoutUnit.sleep(1); pick = delegate.pick(); } } catch (InterruptedException e) { // Simply propagate the interrupt. Thread.currentThread().interrupt(); } return pick; } }
LOG.debug("Transaction service configured at {}:{}.", address, port); } else { Discoverable endpoint = endpointStrategy.pick(); if (endpoint == null) { throw new TException("Unable to discover transaction service.");