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 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–2024 The Apache Software Foundation. All rights reserved.