docs/javadoc/reference/com/facebook/common/executors/StatefulRunnable.html
|
|
Summary: Constants | Fields | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public abstract class
extends Object
implements Runnable
| java.lang.Object | | ↳ | com.facebook.common.executors.StatefulRunnable<T> |
| Known Direct Subclasses
| StatefulProducerRunnable<T> | StatefulRunnable intended to be used by producers. |
|
Abstraction for computation.
Computation expressed as StatefulRunnable can be cancelled, but only if it has not started yet.
For better decoupling of the code computing the result and the code that handles it, 4 separate methods are provided: getResult, onSuccess, onFailure and onCancellation.
This runnable can be run only once. Subsequent calls to run method won't have any effect.
| Constants |
|---|
| int |
| int |
| int |
| int |
| int |
| Fields |
|---|
| protected final AtomicInteger |
| Public Constructors |
|---|
| Public Methods |
|---|
| void |
| final void |
| Protected Methods |
|---|
| void |
| Called after onSuccess callback completes in order to dispose the result. |
| abstract T |
| void |
| Called when the runnable is cancelled. |
| void |
| Called if exception occurred during computation. |
| void |
| Called after computing result successfully. |
| [Expand] Inherited Methods | | --- | | From class java.lang.Object
| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |
| | From interface java.lang.Runnable
| abstract void | run() |
|
Constant Value: 2 (0x00000002)
Constant Value: 0 (0x00000000)
Constant Value: 4 (0x00000004)
Constant Value: 3 (0x00000003)
Constant Value: 1 (0x00000001)
Called after onSuccess callback completes in order to dispose the result.
| Exception | |
Called when the runnable is cancelled.
Called if exception occurred during computation.
Called after computing result successfully.
+Generated by Doclava. +