public class AsyncCompletion<Req extends Request,Res extends Response> extends Object implements org.apache.http.concurrent.FutureCallback<Res>
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
callbackExecutor |
protected List<TableStoreCallback<Request,Response>> |
downstreams |
protected OperationLauncher |
launcher |
protected Req |
request |
protected RetryStrategy |
retry |
protected ScheduledExecutorService |
retryExecutor |
protected TraceLogger |
tracer |
| Constructor and Description |
|---|
AsyncCompletion(OperationLauncher launcher,
Req request,
TraceLogger tracer,
ExecutorService callbackExecutor,
RetryStrategy retry,
ScheduledExecutorService retryExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelled() |
void |
completed(Res result) |
void |
failed(Exception ex) |
void |
onCompleted(Req req,
Res res)
当用户的异步操作成功,将调用此方法。
|
void |
onFailed(Req req,
Exception ex)
当用户的异步操作出错,将调用此方法。
|
com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> |
watchBy(TableStoreCallback<Request,Response> downstream) |
protected OperationLauncher launcher
protected TraceLogger tracer
protected ExecutorService callbackExecutor
protected RetryStrategy retry
protected ScheduledExecutorService retryExecutor
protected List<TableStoreCallback<Request,Response>> downstreams
public AsyncCompletion(OperationLauncher launcher, Req request, TraceLogger tracer, ExecutorService callbackExecutor, RetryStrategy retry, ScheduledExecutorService retryExecutor)
public void completed(Res result)
public void failed(Exception ex)
public void cancelled()
public void onCompleted(Req req, Res res)
TableStoreCallbackonCompleted in interface TableStoreCallback<Req extends Request,Res extends Response>req - 用户的请求res - 用户请求的结果public void onFailed(Req req, Exception ex)
TableStoreCallbackpublic com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> watchBy(TableStoreCallback<Request,Response> downstream)
watchBy in interface WatchableCallback<Request,Response>Copyright © 2024. All Rights Reserved.