use of org.janusgraph.diskstorage.util.time.Timer in project janusgraph by JanusGraph.
the class CombinerLock method lock.
@Override
public void lock(Duration timeout) {
Timer t = times.getTimer().start();
first.lock(timeout);
Duration remainingTimeout = timeout.minus(t.elapsed());
try {
second.lock(remainingTimeout);
} catch (RuntimeException e) {
first.unlock();
throw e;
}
}
Aggregations