public class AsyncCompletion<Req extends Request,Res extends Response> extends Object implements org.apache.http.concurrent.FutureCallback<Res>
限定符和类型 | 字段和说明 |
---|---|
protected ExecutorService |
callbackExecutor |
protected List<TableStoreCallback<Request,Response>> |
downstreams |
protected OperationLauncher |
launcher |
protected Req |
request |
protected RetryStrategy |
retry |
protected ScheduledExecutorService |
retryExecutor |
protected TraceLogger |
tracer |
构造器和说明 |
---|
AsyncCompletion(OperationLauncher launcher,
Req request,
TraceLogger tracer,
ExecutorService callbackExecutor,
RetryStrategy retry,
ScheduledExecutorService retryExecutor) |
限定符和类型 | 方法和说明 |
---|---|
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)
TableStoreCallback
onCompleted
在接口中 TableStoreCallback<Req extends Request,Res extends Response>
req
- 用户的请求res
- 用户请求的结果public void onFailed(Req req, Exception ex)
TableStoreCallback
public com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> watchBy(TableStoreCallback<Request,Response> downstream)
watchBy
在接口中 WatchableCallback<Request,Response>
Copyright © 2017. All Rights Reserved.