Class BalancedClientFuture<V>
java.lang.Object
org.apache.qpid.protonj2.client.futures.ClientFuture<V>
org.apache.qpid.protonj2.client.futures.BalancedClientFuture<V>
- Type Parameters:
V- The type that result from completion of this Future
- All Implemented Interfaces:
Future<V>,AsyncResult<V>
A more balanced implementation of a ClientFuture that works better on some
platforms such as windows where the thread park and atomic operations used by
a more aggressive implementation could result in poor performance.
-
Field Summary
Fields inherited from class org.apache.qpid.protonj2.client.futures.ClientFuture
CANCELLED, COMPLETING, error, FAILURE, INCOMPLETE, result, STATE_FIELD_UPDATER, SUCCESS, synchronization, waiting -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newBalancedClientFutureinstance with no assignedClientSynchronization.BalancedClientFuture(ClientSynchronization<V> synchronization) Create a newBalancedClientFutureinstance with the assignedClientSynchronization. -
Method Summary
Methods inherited from class org.apache.qpid.protonj2.client.futures.ClientFuture
cancel, complete, failed, getResult, getState, isCancelled, isComplete, isDone, isFailed, isNotComplete, tryCancelTask
-
Constructor Details
-
BalancedClientFuture
public BalancedClientFuture()Create a newBalancedClientFutureinstance with no assignedClientSynchronization. -
BalancedClientFuture
Create a newBalancedClientFutureinstance with the assignedClientSynchronization.- Parameters:
synchronization- theClientSynchronizationthat should be notified upon completion of this future.
-
-
Method Details
-
get
public V get(long amount, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<V>- Specified by:
getin classClientFuture<V>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
get
- Specified by:
getin interfaceFuture<V>- Specified by:
getin classClientFuture<V>- Throws:
InterruptedExceptionExecutionException
-