abstract class AbstractBufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> extends java.lang.Object implements BufferBuilder<R,T,U>
Modifier and Type | Field and Description |
---|---|
protected PushbackPolicy<T,U> |
backPressure |
protected U |
buffer |
protected QueuePolicy<T,U> |
bufferingPolicy |
protected int |
concurrency |
protected java.util.concurrent.ScheduledExecutorService |
timer |
protected java.util.concurrent.Executor |
worker |
Constructor and Description |
---|
AbstractBufferBuilder() |
Modifier and Type | Method and Description |
---|---|
BufferBuilder<R,T,U> |
withBuffer(U queue)
The BlockingQueue implementation to use as a buffer
|
BufferBuilder<R,T,U> |
withExecutor(java.util.concurrent.Executor executor)
Set the
Executor that should be used to deliver events from this
buffer |
BufferBuilder<R,T,U> |
withParallelism(int parallelism)
Set the maximum permitted number of concurrent event deliveries allowed
from this buffer
|
BufferBuilder<R,T,U> |
withPushbackPolicy(PushbackPolicy<T,U> pushbackPolicy)
Set the
PushbackPolicy of this builder |
BufferBuilder<R,T,U> |
withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption,
long time)
Set the
PushbackPolicy of this builder |
BufferBuilder<R,T,U> |
withQueuePolicy(QueuePolicy<T,U> queuePolicy)
Set the
QueuePolicy of this Builder |
BufferBuilder<R,T,U> |
withQueuePolicy(QueuePolicyOption queuePolicyOption)
Set the
QueuePolicy of this Builder |
BufferBuilder<R,T,U> |
withScheduler(java.util.concurrent.ScheduledExecutorService scheduler)
Set the
ScheduledExecutorService that should be used to trigger
timed events after this buffer |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build
protected java.util.concurrent.Executor worker
protected java.util.concurrent.ScheduledExecutorService timer
protected int concurrency
protected PushbackPolicy<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> backPressure
protected QueuePolicy<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> bufferingPolicy
public BufferBuilder<R,T,U> withBuffer(U queue)
BufferBuilder
withBuffer
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withQueuePolicy(QueuePolicy<T,U> queuePolicy)
BufferBuilder
QueuePolicy
of this BuilderwithQueuePolicy
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withQueuePolicy(QueuePolicyOption queuePolicyOption)
BufferBuilder
QueuePolicy
of this BuilderwithQueuePolicy
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withPushbackPolicy(PushbackPolicy<T,U> pushbackPolicy)
BufferBuilder
PushbackPolicy
of this builderwithPushbackPolicy
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption, long time)
BufferBuilder
PushbackPolicy
of this builderwithPushbackPolicy
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withParallelism(int parallelism)
BufferBuilder
withParallelism
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withExecutor(java.util.concurrent.Executor executor)
BufferBuilder
Executor
that should be used to deliver events from this
bufferwithExecutor
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
public BufferBuilder<R,T,U> withScheduler(java.util.concurrent.ScheduledExecutorService scheduler)
BufferBuilder
ScheduledExecutorService
that should be used to trigger
timed events after this bufferwithScheduler
in interface BufferBuilder<R,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>