public class FailoverClosureImpl extends java.lang.Object implements FailoverClosure
| 限定符和类型 | 字段和说明 |
|---|---|
private Response |
data |
private java.util.concurrent.CompletableFuture<Response> |
future |
private java.lang.Throwable |
throwable |
| 构造器和说明 |
|---|
FailoverClosureImpl(java.util.concurrent.CompletableFuture<Response> future) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
run(com.alipay.sofa.jraft.Status status) |
void |
setResponse(Response data)
Set the return interface if needed.
|
void |
setThrowable(java.lang.Throwable throwable)
Catch exception.
|
private final java.util.concurrent.CompletableFuture<Response> future
private volatile Response data
private volatile java.lang.Throwable throwable
public FailoverClosureImpl(java.util.concurrent.CompletableFuture<Response> future)
public void setResponse(Response data)
FailoverClosuresetResponse 在接口中 FailoverClosuredata - { Response} datapublic void setThrowable(java.lang.Throwable throwable)
FailoverClosuresetThrowable 在接口中 FailoverClosurethrowable - { Throwable}public void run(com.alipay.sofa.jraft.Status status)
run 在接口中 com.alipay.sofa.jraft.ClosureCopyright © 2018–2022 Alibaba Group. All rights reserved.