Class OperationResult<R>
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.async.OperationResult<R>
-
- All Implemented Interfaces:
Serializable
public class OperationResult<R> extends Object implements Serializable
Encapsulates the result of an asynchronous operation. Depending on itsOperationResultStatus, it contains either the actual result (if completed successfully), or the cause of failure (if it failed), or none of the two (if still in progress).- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)static <R extends Serializable>
OperationResult<R>failure(Throwable throwable)RgetResult()OperationResultStatusgetStatus()ThrowablegetThrowable()static <R extends Serializable>
OperationResult<R>inProgress()booleanisFinished()static <R extends Serializable>
OperationResult<R>success(R result)
-
-
-
Method Detail
-
isFinished
public boolean isFinished()
-
getStatus
public OperationResultStatus getStatus()
-
getResult
public R getResult()
-
getThrowable
public Throwable getThrowable()
-
failure
public static <R extends Serializable> OperationResult<R> failure(Throwable throwable)
-
success
public static <R extends Serializable> OperationResult<R> success(R result)
-
inProgress
public static <R extends Serializable> OperationResult<R> inProgress()
-
-