/** * Return the oracle that the current client is connected to. */ public synchronized String getOracle() { checkClosed(); return currentLeader != null ? currentLeader.getId() : null; }
checkClosed(); long waitTotal = 0; while (!tr.cdl.await(waitPeriod, TimeUnit.SECONDS)) { checkClosed(); waitTotal += waitPeriod; if (waitPeriod < MAX_ORACLE_WAIT_PERIOD) {