public class CallbackImpledFuture<Req,Res> extends Object implements Future<Res>
| Modifier and Type | Field and Description |
|---|---|
protected List<TableStoreCallback<Request,Response>> |
downstreams |
| Constructor and Description |
|---|
CallbackImpledFuture() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
Res |
get() |
Res |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
onCompleted(Req request,
Res result)
当用户的异步操作成功,将调用此方法。
|
void |
onFailed(Req request,
Exception ex)
当用户的异步操作出错,将调用此方法。
|
com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> |
watchBy(TableStoreCallback<Request,Response> downstream) |
protected List<TableStoreCallback<Request,Response>> downstreams
public void onCompleted(Req request, Res result)
TableStoreCallbackonCompleted in interface TableStoreCallback<Req,Res>request - 用户的请求result - 用户请求的结果public void onFailed(Req request, Exception ex)
TableStoreCallbackonFailed in interface TableStoreCallback<Req,Res>request - 用户的请求ex - 请求的返回结果无效、或遇到网络异常,则为ClientException;TableStore服务返回的异常,则为TableStoreException。public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Res>public Res get() throws InterruptedException, ExecutionException
get in interface Future<Res>InterruptedExceptionExecutionExceptionpublic Res get(long timeout, TimeUnit unit) throws TimeoutException, InterruptedException, ExecutionException
get in interface Future<Res>TimeoutExceptionInterruptedExceptionExecutionExceptionpublic com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> watchBy(TableStoreCallback<Request,Response> downstream)
watchBy in interface WatchableCallback<Request,Response>Copyright © 2024. All Rights Reserved.