public static class Result.CompatibleResult extends Result.AbstractResult
CompletableFuture.AsynchronousCompletionTaskResult.AbstractResult, Result.CompatibleResult| 构造器和说明 |
|---|
CompatibleResult(Result result) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addAttachments(Map<String,String> map)
Add the specified map to existing attachments in this instance.
|
String |
getAttachment(String key)
get attachment by key.
|
String |
getAttachment(String key,
String defaultValue)
get attachment by key with default value.
|
Map<String,String> |
getAttachments()
get attachments.
|
Result |
getDelegate() |
Throwable |
getException()
Get exception.
|
Object |
getValue()
Get invoke result.
|
boolean |
hasException()
Has exception.
|
Object |
recreate()
Recreate.
|
void |
setAttachment(String key,
String value) |
void |
setAttachments(Map<String,String> map)
Replace the existing attachments with the specified param.
|
void |
setException(Throwable t) |
void |
setValue(Object value) |
thenApplyWithContextacceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsynccompletionFuture, getNowacceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsyncpublic CompatibleResult(Result result)
public Result getDelegate()
public Object getValue()
Resultpublic void setValue(Object value)
public Throwable getException()
Resultpublic void setException(Throwable t)
public boolean hasException()
Resultpublic Object recreate() throws Throwable
Result
if (hasException()) {
throw getException();
} else {
return getValue();
}
Throwablepublic Map<String,String> getAttachments()
Resultpublic void addAttachments(Map<String,String> map)
Resultpublic void setAttachments(Map<String,String> map)
Resultpublic String getAttachment(String key)
Resultpublic String getAttachment(String key, String defaultValue)
ResultCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.