Class ClientFutureFactory
java.lang.Object
org.apache.qpid.protonj2.client.futures.ClientFutureFactory
Factory for client future instances that will create specific versions based on
 configuration.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringNames a future type that uses a balanced spin then wait for the operation outcome.static final StringNames a future type that uses a conservative wait for the operation outcome.static final StringNames a future type that uses a progressive spin then wait for the operation outcome.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> Future<T>completedFuture(T result) Creates and returns aFuturetype that is already marked completed and will return the provided result to any caller that requests the future's outcome.static ClientFutureFactoryCreate a new ClientFutureFactory instance based on the given type name.abstract <V> ClientFuture<V>abstract <V> ClientFuture<V>createFuture(ClientSynchronization<V> synchronization) abstract <V> ClientFuture<V>abstract <V> ClientFuture<V>createUnfailableFuture(ClientSynchronization<V> synchronization) 
- 
Field Details- 
CONSERVATIVENames a future type that uses a conservative wait for the operation outcome.- See Also:
 
- 
BALANCEDNames a future type that uses a balanced spin then wait for the operation outcome.- See Also:
 
- 
PROGRESSIVENames a future type that uses a progressive spin then wait for the operation outcome.- See Also:
 
 
- 
- 
Constructor Details- 
ClientFutureFactorypublic ClientFutureFactory()
 
- 
- 
Method Details- 
createCreate a new ClientFutureFactory instance based on the given type name.- Parameters:
- futureType- the future type whose factory should be returned.
- Returns:
- a new ClientFutureFactorythat will be used to create the desired future types.
 
- 
completedFutureCreates and returns aFuturetype that is already marked completed and will return the provided result to any caller that requests the future's outcome.
- 
createFuture- Type Parameters:
- V- the eventual result type for this Future
- Returns:
- a new ClientFuture instance.
 
- 
createFuture- Type Parameters:
- V- the eventual result type for this Future
- Parameters:
- synchronization- The- ClientSynchronizationto assign to the returned- ClientFuture.
- Returns:
- a new ClientFuture instance.
 
- 
createUnfailableFuture- Type Parameters:
- V- the eventual result type for this Future
- Returns:
- a ClientFuture that treats failures as success calls that simply complete the operation.
 
- 
createUnfailableFuturepublic abstract <V> ClientFuture<V> createUnfailableFuture(ClientSynchronization<V> synchronization) - Type Parameters:
- V- the eventual result type for this Future
- Parameters:
- synchronization- The- ClientSynchronizationto assign to the returned- ClientFuture.
- Returns:
- a ClientFuture that treats failures as success calls that simply complete the operation.
 
 
-