T - The core response type.S - The core query info type.T2 - The converted response type.S2 - The converted query info type.public abstract class CoreFutureAdapter<T2,S2,T,S> extends ListenableFuture<T2,S2> implements RiakFutureListener<T,S>
| Constructor and Description |
|---|
CoreFutureAdapter(RiakFuture<T,S> coreFuture) |
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Waits for this RiakFuture to be completed.
|
void |
await(long timeout,
TimeUnit unit)
Waits for this RiakFuture to be completed, or times out.
|
boolean |
cancel(boolean mayInterruptIfRunning) |
Throwable |
cause()
Return information about the operation and why it failed.
|
protected abstract S2 |
convertQueryInfo(S coreQueryInfo) |
protected abstract T2 |
convertResponse(T coreResponse) |
T2 |
get() |
T2 |
get(long timeout,
TimeUnit unit) |
S2 |
getQueryInfo()
Returns information related to the operation performed.
|
void |
handle(RiakFuture<T,S> f) |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isSuccess()
Determine if the operation was successful.
|
addListener, notifyListeners, removeListenerpublic CoreFutureAdapter(RiakFuture<T,S> coreFuture)
public boolean cancel(boolean mayInterruptIfRunning)
public T2 get() throws InterruptedException
get in interface RiakFuture<T2,S2>get in interface Future<T2>InterruptedExceptionpublic T2 get(long timeout, TimeUnit unit) throws InterruptedException
get in interface RiakFuture<T2,S2>get in interface Future<T2>InterruptedExceptionpublic boolean isCancelled()
isCancelled in interface RiakFuture<T2,S2>isCancelled in interface Future<T2>public boolean isDone()
public void await()
throws InterruptedException
RiakFutureawait in interface RiakFuture<T2,S2>InterruptedExceptionpublic void await(long timeout,
TimeUnit unit)
throws InterruptedException
RiakFutureawait in interface RiakFuture<T2,S2>timeout - the amount of time to wait before returning.unit - the unit of time.InterruptedExceptionpublic boolean isSuccess()
RiakFutureisSuccess in interface RiakFuture<T2,S2>public Throwable cause()
RiakFuturecause in interface RiakFuture<T2,S2>public S2 getQueryInfo()
RiakFutureUseful in async operations when you want to know what operation this future refers to.
getQueryInfo in interface RiakFuture<T2,S2>public void handle(RiakFuture<T,S> f)
handle in interface RiakFutureListener<T,S>Copyright © 2014. All rights reserved.