K - the type of the conflation keyV - the type of elements in the queuepublic interface ConflationQueueBuilder<K,V>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ConflationQueueBuilder.ExchangeConflationQueueBuilder<K,V>
Builder for
ExchangeConflationQueue subtypes. |
| Modifier and Type | Method and Description |
|---|---|
ConflationQueue<K,V> |
build(java.util.function.Supplier<? extends java.util.Queue<java.lang.Object>> queueFactory)
Builds and returns a new conflation queue instance using the given queue factory for the backing queue.
|
static <K,V> ConflationQueueBuilder<K,V> |
builder()
Creates an initial builder; use this method only when conflation keys are not known in advance
|
static <K,V> ConflationQueueBuilder<K,V> |
builder(java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Creates an initial builder; use this method only when conflation keys are not known in advance.
|
static <K,V> ConflationQueueBuilder<K,V> |
declareAllConflationKeys(K... allConflationKeys)
Creates an initial builder given all conflation keys (exhaustive!).
|
static <K,V> ConflationQueueBuilder<K,V> |
declareAllConflationKeys(java.util.List<K> allConflationKeys)
Creates an initial builder given all conflation keys (exhaustive!).
|
static <K,V> ConflationQueueBuilder<K,V> |
declareAllConflationKeys(java.util.List<K> allConflationKeys,
java.lang.Class<V> valueType)
Creates an initial builder given all conflation keys (exhaustive!).
|
static <K extends java.lang.Enum<K>,V> |
forEnumConflationKey(java.lang.Class<K> keyType)
Creates an initial builder given the enum conflation key class.
|
static <K extends java.lang.Enum<K>,V> |
forEnumConflationKey(java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
Creates an initial builder given the enum conflation key class.
|
ConflationQueueBuilder<K,V> |
withAppenderListener(java.util.function.Supplier<? extends AppenderListener<? super K,? super V>> listenerSupplier)
Register a listener as created by the specified supplier when creating queue appenders.
|
ConflationQueueBuilder.ExchangeConflationQueueBuilder<K,V> |
withExchangeValueSupport()
Switch builder mode to create a conflation queue that allows exchanging of elements between the consumer and the
producer, that is, the builder will now create a
ExchangeConflationQueue. |
ConflationQueueBuilder.ExchangeConflationQueueBuilder<K,V> |
withMerging(Merger<? super K,V> merger)
Switch builder mode to create a conflation queue that supports merging of old and new values when conflation
occurs, that is, the builder will now create a
MergeConflationQueue. |
ConflationQueueBuilder<K,V> |
withPollerListener(java.util.function.Supplier<? extends PollerListener<? super K,? super V>> listenerSupplier)
Register a listener as created by the specified supplier when creating queue pollers.
|
static <K,V> ConflationQueueBuilder<K,V> builder()
K - the type of the conflation keyV - the type of elements in the queuestatic <K,V> ConflationQueueBuilder<K,V> builder(java.lang.Class<K> keyType, java.lang.Class<V> valueType)
K - the type of the conflation keyV - the type of elements in the queuekeyType - the type of the conflation key, used only to infer the generic type of the buildervalueType - the type of elements in the queue, used only to infer the generic type of the builder@SafeVarargs static <K,V> ConflationQueueBuilder<K,V> declareAllConflationKeys(K... allConflationKeys)
K - the type of the conflation keyV - the type of elements in the queueallConflationKeys - an exhaustive list of all conflation keys that will ever be used for the queuestatic <K,V> ConflationQueueBuilder<K,V> declareAllConflationKeys(java.util.List<K> allConflationKeys)
K - the type of the conflation keyV - the type of elements in the queueallConflationKeys - an exhaustive list of all conflation keys that will ever be used for the queuestatic <K,V> ConflationQueueBuilder<K,V> declareAllConflationKeys(java.util.List<K> allConflationKeys, java.lang.Class<V> valueType)
K - the type of the conflation keyV - the type of elements in the queueallConflationKeys - an exhaustive list of all conflation keys that will ever be used for the queuevalueType - the type of elements in the queue, used only to infer the generic type of the builderstatic <K extends java.lang.Enum<K>,V> ConflationQueueBuilder<K,V> forEnumConflationKey(java.lang.Class<K> keyType)
K - the type of the conflation keyV - the type of elements in the queuekeyType - the type of the conflation keystatic <K extends java.lang.Enum<K>,V> ConflationQueueBuilder<K,V> forEnumConflationKey(java.lang.Class<K> keyType, java.lang.Class<V> valueType)
K - the type of the conflation keyV - the type of elements in the queuekeyType - the type of the conflation keyvalueType - the type of elements in the queue, used only to infer the generic type of the builderConflationQueueBuilder<K,V> withAppenderListener(java.util.function.Supplier<? extends AppenderListener<? super K,? super V>> listenerSupplier)
AppenderListener.threadLocalSupplier(Supplier).listenerSupplier - a listener supplier acting as listener factoryConflationQueueBuilder<K,V> withPollerListener(java.util.function.Supplier<? extends PollerListener<? super K,? super V>> listenerSupplier)
PollerListener.threadLocalSupplier(Supplier).listenerSupplier - a listener supplier acting as listener factoryConflationQueueBuilder.ExchangeConflationQueueBuilder<K,V> withExchangeValueSupport()
ExchangeConflationQueue.ExchangeConflationQueue, more specifically an EvictConflationQueueExchangeConflationQueue,
EvictConflationQueue,
withMerging(Merger)ConflationQueueBuilder.ExchangeConflationQueueBuilder<K,V> withMerging(Merger<? super K,V> merger)
MergeConflationQueue.merger - merge strategy to use when conflation occursExchangeConflationQueue, more specifically a MergeConflationQueueExchangeConflationQueue,
MergeConflationQueue,
withExchangeValueSupport()ConflationQueue<K,V> build(java.util.function.Supplier<? extends java.util.Queue<java.lang.Object>> queueFactory)
queueFactory - the factory to create the backing queue