public class OperationResult<R> extends Object implements Serializable
OperationResultStatus, 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).| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object other) |
static <R extends Serializable> |
failure(Throwable throwable) |
R |
getResult() |
OperationResultStatus |
getStatus() |
Throwable |
getThrowable() |
static <R extends Serializable> |
inProgress() |
boolean |
isFinished() |
static <R extends Serializable> |
success(R result) |
public boolean isFinished()
public OperationResultStatus getStatus()
public R getResult()
public Throwable getThrowable()
public static <R extends Serializable> OperationResult<R> failure(Throwable throwable)
public static <R extends Serializable> OperationResult<R> success(R result)
public static <R extends Serializable> OperationResult<R> inProgress()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.