public class CallbackImpledFuture<Req,Res> extends Object implements Future<Res>
限定符和类型 | 字段和说明 |
---|---|
protected List<TableStoreCallback<Request,Response>> |
downstreams |
构造器和说明 |
---|
CallbackImpledFuture() |
限定符和类型 | 方法和说明 |
---|---|
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)
TableStoreCallback
onCompleted
在接口中 TableStoreCallback<Req,Res>
request
- 用户的请求result
- 用户请求的结果public void onFailed(Req request, Exception ex)
TableStoreCallback
onFailed
在接口中 TableStoreCallback<Req,Res>
request
- 用户的请求ex
- 请求的返回结果无效、或遇到网络异常,则为ClientException;TableStore服务返回的异常,则为TableStoreException。public boolean isCancelled()
isCancelled
在接口中 Future<Res>
public Res get() throws InterruptedException, ExecutionException
get
在接口中 Future<Res>
InterruptedException
ExecutionException
public Res get(long timeout, TimeUnit unit) throws TimeoutException, InterruptedException, ExecutionException
get
在接口中 Future<Res>
TimeoutException
InterruptedException
ExecutionException
public com.alicloud.openservices.tablestore.core.AbstractWatchableCallback<Request,Response> watchBy(TableStoreCallback<Request,Response> downstream)
watchBy
在接口中 WatchableCallback<Request,Response>
Copyright © 2016. All Rights Reserved.