Class StatusWithResult<T>
java.lang.Object
ch.systemsx.cisd.common.exceptions.Status
ch.systemsx.cisd.common.exceptions.StatusWithResult<T>
A
Status that can also hold a result.-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStatusWithResult(StatusFlag flag, String messageOrNull, T resultOrNull) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> StatusWithResult<T> create(T resultOrNull) Creates a new result with statusStatusFlag.OKand resultOrNull.static <T> StatusWithResult<T> static <T> StatusWithResult<T> createErrorWithResult(boolean retriable) Create an error.static <T> StatusWithResult<T> createErrorWithResult(String message) static <T> StatusWithResult<T> createErrorx(boolean retriable, String message) static <T> StatusWithResult<T> static <T> StatusWithResult<T> createRetriableErrorWithResult(String message) booleaninthashCode()toString()final TReturns the result of the operation (may benull).Methods inherited from class ch.systemsx.cisd.common.exceptions.Status
createError, createError, createError, createError, createError, createRetriableError, createRetriableError, createRetriableError, getErrorFlag, getFlag, isError, isNonRetriableError, isOK, isRetriableError, tryGetErrorMessage
-
Constructor Details
-
StatusWithResult
-
-
Method Details
-
create
Creates a new result with statusStatusFlag.OKand resultOrNull. -
createErrorWithResult
Create an error.- Parameters:
retriable- Iftrue, the error will be marked 'retriable'.
-
createErrorx
-
createErrorWithResult
-
createErrorWithResult
-
createRetriableErrorWithResult
-
createRetriableErrorWithResult
-
tryGetResult
Returns the result of the operation (may benull). -
equals
-
hashCode
public int hashCode() -
toString
-