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).| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static <R> OperationResult<R> |
failure(Throwable throwable) |
R |
getResult() |
OperationResultStatus |
getStatus() |
Throwable |
getThrowable() |
static <R> OperationResult<R> |
inProgress() |
boolean |
isFinished() |
static <R> OperationResult<R> |
success(R result) |
public boolean isFinished()
public OperationResultStatus getStatus()
public R getResult()
public Throwable getThrowable()
public static <R> OperationResult<R> failure(Throwable throwable)
public static <R> OperationResult<R> success(R result)
public static <R> OperationResult<R> inProgress()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.