Map<String, Object> innerGet(long nanosTimeout) throws InterruptedException, ExecutionException, TimeoutException { if (!tryAcquireSharedNanos(0, nanosTimeout)) { throw new TimeoutException(); } if (getState() == CANCELED) { throw new CancellationException(); } if (exception != null) { throw new ExecutionException(exception); } return result; }
Map<String, Object> innerGet() throws InterruptedException, ExecutionException { acquireSharedInterruptibly(0); if (getState() == CANCELED) { throw new CancellationException(); } if (exception != null) { throw new ExecutionException(exception); } return result; }
boolean innerCancel(boolean mayInterruptIfRunning) { for (; ; ) { int s = getState(); if (ranOrCancelled(s)) { return false; } if (compareAndSetState(s, CANCELED)) { break; } } if (mayInterruptIfRunning) { Thread r = runningThread; if (r != null) { r.interrupt(); } } releaseShared(0); done(); return true; }
boolean innerCancel(boolean mayInterruptIfRunning) { for (;;) { int s = getState(); if (ranOrCancelled(s)) { return false; } if (compareAndSetState(s, CANCELED)) { break; } } if (mayInterruptIfRunning) { Thread r = runningThread; if (r != null) { r.interrupt(); } } releaseShared(0); done(); return true; }
void innerSetException(Throwable t) { for (;;) { int s = getState(); if (ranOrCancelled(s)) { return; } if (compareAndSetState(s, COMPLETED)) { break; } } exception = t; result = null; releaseShared(0); done(); }
boolean innerIsCancelled() { return getState() == CANCELED; }
boolean innerIsDone() { return ranOrCancelled(getState()) && runningThread == null; }
void innerSet(Map<String,Object> v) { for (;;) { int s = getState(); if (ranOrCancelled(s)) { return; } if (compareAndSetState(s, COMPLETED)) { break; } } result = v; releaseShared(0); done(); }
Map<String,Object> innerGet() throws InterruptedException, ExecutionException { acquireSharedInterruptibly(0); if (getState() == CANCELED) { throw new CancellationException(); } if (exception != null) { throw new ExecutionException(exception); } return result; }
Map<String,Object> innerGet(long nanosTimeout) throws InterruptedException, ExecutionException, TimeoutException { if (!tryAcquireSharedNanos(0, nanosTimeout)) { throw new TimeoutException(); } if (getState() == CANCELED) { throw new CancellationException(); } if (exception != null) { throw new ExecutionException(exception); } return result; }
void innerSetException(Throwable t) { for (; ; ) { int s = getState(); if (ranOrCancelled(s)) { return; } if (compareAndSetState(s, COMPLETED)) { break; } } exception = t; result = null; releaseShared(0); done(); }
void innerSet(Map<String, Object> v) { for (; ; ) { int s = getState(); if (ranOrCancelled(s)) { return; } if (compareAndSetState(s, COMPLETED)) { break; } } result = v; releaseShared(0); done(); }
boolean innerIsDone() { return ranOrCancelled(getState()) && runningThread == null; }
boolean innerIsCancelled() { return getState() == CANCELED; }