public class BaseSuspendable extends Task implements Suspendable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
startup |
protected java.util.concurrent.atomic.AtomicInteger |
suspended |
| Constructor and Description |
|---|
BaseSuspendable() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSuspended() |
protected void |
onResume() |
protected void |
onStartup() |
protected void |
onSuspend() |
void |
resume()
Resumes the invocation of tasks on a dispatch object.
|
void |
run() |
void |
suspend()
Suspends the invocation of tasks on a dispatch object.
|
protected final java.util.concurrent.atomic.AtomicBoolean startup
protected final java.util.concurrent.atomic.AtomicInteger suspended
public boolean isSuspended()
isSuspended in interface SuspendableSuspendable.resume(),
Suspendable.suspend()public void resume()
SuspendableResumes the invocation of tasks on a dispatch object.
resume in interface SuspendableSuspendable.suspend()public void suspend()
SuspendableSuspends the invocation of tasks on a dispatch object.
A suspended object will not invoke any tasks associated with it. The suspension of an object will occur after any running runnable associated with the object completes.
Calls to Suspendable.suspend() must be balanced with calls
to Suspendable.resume().
suspend in interface SuspendableSuspendable.resume()protected void onStartup()
protected void onSuspend()
protected void onResume()