in modules/core/src/main/java/org/apache/fluo/core/oracle/OracleClient.java [355:383]
public Stamp getStamp() {
checkClosed();
TimeRequest tr = new TimeRequest();
try {
queue.put(tr);
int timeout = env.getConfiguration().getConnectionRetryTimeout();
if (timeout < 0) {
long waitPeriod = 1;
long waitTotal = 0;
while (!tr.cdl.await(waitPeriod, TimeUnit.SECONDS)) {
checkClosed();
waitTotal += waitPeriod;
if (waitPeriod < MAX_ORACLE_WAIT_PERIOD) {
waitPeriod *= 2;
}
log.warn(
"Waiting for timestamp from Oracle. Is it running? Client has waited a total of {}s and will retry in {}s",
waitTotal, waitPeriod);
}
} else if (!tr.cdl.await(timeout, TimeUnit.MILLISECONDS)) {
throw new FluoException("Timed out (after " + timeout
+ "ms) trying to retrieve timestamp from Oracle. Is the Oracle running?");
}
} catch (InterruptedException e) {
throw new FluoException("Interrupted while retrieving timestamp from Oracle", e);
}
return tr.stampRef.get();
}