protected static final class ExecutionService.DistributedFuture.Sync<V> extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject| Modifier and Type | Field and Description |
|---|---|
protected Callable<V> |
callable
The underlying callable
|
protected static int |
CANCELLED
State value representing that task was cancelled
|
protected Throwable |
exception
The exception to throw from get()
|
protected ExecutionService.DistributedFuture<V> |
future
The containing future
|
protected static int |
RAN
State value representing that task ran
|
protected V |
result
The result to return from get()
|
protected Thread |
runner
The thread running task.
|
protected static int |
RUNNING
State value representing that task is running
|
| Constructor and Description |
|---|
ExecutionService.DistributedFuture.Sync(ExecutionService.DistributedFuture<V> future,
Callable<V> callable) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
tryAcquireShared(int ignore)
Implements AQS base acquire to succeed if ran or cancelled
|
protected boolean |
tryReleaseShared(int ignore)
Implements AQS base release to always signal after setting
final done status by nulling runner thread.
|
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, toString, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryReleasegetExclusiveOwnerThread, setExclusiveOwnerThreadprotected static final int RUNNING
protected static final int RAN
protected static final int CANCELLED
protected final ExecutionService.DistributedFuture<V> future
protected V result
protected Throwable exception
protected transient volatile Thread runner
public ExecutionService.DistributedFuture.Sync(ExecutionService.DistributedFuture<V> future, Callable<V> callable)
protected int tryAcquireShared(int ignore)
tryAcquireShared in class AbstractQueuedSynchronizerprotected boolean tryReleaseShared(int ignore)
tryReleaseShared in class AbstractQueuedSynchronizerCopyright © 2012 JBoss by Red Hat. All Rights Reserved.