| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | InterruptibleTask.
Using this as the blocker object allows introspection and debugging tools to see that the currentRunner thread is blocked on the progress of the interruptor thread, which can help identify deadlocks. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Runnable | |
| private static final int | |
| private static final Runnable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract void | afterRanInterruptiblyFailure(Throwable error)
Any interruption that happens as a result of calling interruptTask will arrive before this method is called. |
| pack-priv abstract void | afterRanInterruptiblySuccess(T result)
Any interruption that happens as a result of calling interruptTask will arrive before this method is called. |
| pack-priv final void | |
| pack-priv abstract boolean | isDone()
Called before runInterruptibly - if true, runInterruptibly and afterRanInterruptibly will not be called. |
| public final void | |
| pack-priv abstract T | runInterruptibly()
Do interruptible work here - do not complete Futures here, as their listeners could be interrupted. |
| pack-priv abstract String | |
| public final String | toString()
Overrides java. |
| private void |
| DONE | back to summary |
|---|---|
| private static final Runnable DONE | |
| MAX_BUSY_WAIT_SPINS | back to summary |
|---|---|
| private static final int MAX_BUSY_WAIT_SPINS | |
| PARKED | back to summary |
|---|---|
| private static final Runnable PARKED | |
| InterruptibleTask | back to summary |
|---|---|
| pack-priv InterruptibleTask() | |
| afterRanInterruptiblyFailure | back to summary |
|---|---|
| pack-priv abstract void afterRanInterruptiblyFailure(Throwable error) Any interruption that happens as a result of calling interruptTask will arrive before this method is called. Complete Futures here. | |
| afterRanInterruptiblySuccess | back to summary |
|---|---|
| pack-priv abstract void afterRanInterruptiblySuccess(T result) Any interruption that happens as a result of calling interruptTask will arrive before this method is called. Complete Futures here. | |
| interruptTask | back to summary |
|---|---|
| pack-priv final void interruptTask() Interrupts the running task. Because this internally calls | |
| isDone | back to summary |
|---|---|
| pack-priv abstract boolean isDone() Called before runInterruptibly - if true, runInterruptibly and afterRanInterruptibly will not be called. | |
| run | back to summary |
|---|---|
| public final void run() Implements java. Doc from java. Runs this operation.
| |
| runInterruptibly | back to summary |
|---|---|
| pack-priv abstract T runInterruptibly() throws Exception Do interruptible work here - do not complete Futures here, as their listeners could be interrupted.
| |
| toPendingString | back to summary |
|---|---|
| pack-priv abstract String toPendingString() | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns the String representation of the current value. | |
| waitForInterrupt | back to summary |
|---|---|
| private void waitForInterrupt(Thread currentThread) | |
| Modifier and Type | Field and Description |
|---|---|
| private final InterruptibleTask |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Thread | |
| public void | |
| private void | |
| public String |
| task | back to summary |
|---|---|
| private final InterruptibleTask<?> task | |
| Blocker | back to summary |
|---|---|
| private Blocker(InterruptibleTask<?> task) | |
| getOwner | back to summary |
|---|---|
pack-priv Thread getOwner()
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| setOwner | back to summary |
|---|---|
| private void setOwner(Thread thread) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| DoNothingRunnable | back to summary |
|---|---|
| private DoNothingRunnable() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |