Package org.apache.qpid.jms.provider
Class BalancedProviderFuture
java.lang.Object
org.apache.qpid.jms.provider.ProviderFuture
org.apache.qpid.jms.provider.BalancedProviderFuture
- All Implemented Interfaces:
AsyncResult
A more balanced implementation of a ProviderFuture 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.jms.provider.ProviderFuture
COMPLETING, error, FAILURE, INCOMPLETE, STATE_FIELD_UPDATER, SUCCESS, synchronization, waiting
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.qpid.jms.provider.ProviderFuture
failOnError, isComplete, onFailure, onSuccess
-
Constructor Details
-
BalancedProviderFuture
public BalancedProviderFuture() -
BalancedProviderFuture
-
-
Method Details
-
sync
Description copied from class:ProviderFuture
Timed wait for a response to a Provider operation.- Specified by:
sync
in classProviderFuture
- Parameters:
amount
- The amount of time to wait before abandoning the wait.unit
- The unit to use for this wait period.- Returns:
- true if the operation succeeded and false if the waiting time elapsed while waiting for the operation to complete.
- Throws:
ProviderException
- if an error occurs while waiting for the response.
-
sync
Description copied from class:ProviderFuture
Waits for a response to some Provider requested operation.- Specified by:
sync
in classProviderFuture
- Throws:
ProviderException
- if an error occurs while waiting for the response.
-