public class ProviderFuture extends Object implements AsyncResult
Constructor and Description |
---|
ProviderFuture() |
ProviderFuture(ProviderSynchronization synchronization) |
Modifier and Type | Method and Description |
---|---|
boolean |
isComplete()
Returns true if the AsyncResult has completed.
|
void |
onFailure(Throwable result)
If the operation fails this method is invoked with the Exception
that caused the failure.
|
void |
onSuccess()
If the operation succeeds the resulting value produced is set to null and
the waiting parties are signaled.
|
void |
sync()
Waits for a response to some Provider requested operation.
|
void |
sync(long amount,
TimeUnit unit)
Timed wait for a response to a Provider operation.
|
public ProviderFuture()
public ProviderFuture(ProviderSynchronization synchronization)
public boolean isComplete()
AsyncResult
isComplete
in interface AsyncResult
public void onFailure(Throwable result)
AsyncResult
onFailure
in interface AsyncResult
result
- The error that resulted in this asynchronous operation failing.public void onSuccess()
AsyncResult
onSuccess
in interface AsyncResult
public void sync(long amount, TimeUnit unit) throws IOException
amount
- The amount of time to wait before abandoning the wait.unit
- The unit to use for this wait period.IOException
- if an error occurs while waiting for the response.public void sync() throws IOException
IOException
- if an error occurs while waiting for the response.Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.