Package org.osgi.util.pushstream
Class AbstractBufferBuilder<R,T,U extends BlockingQueue<PushEvent<? extends T>>>
java.lang.Object
org.osgi.util.pushstream.AbstractBufferBuilder<R,T,U>
- All Implemented Interfaces:
BufferBuilder<R,
T, U>
- Direct Known Subclasses:
PushStreamBuilderImpl
abstract class AbstractBufferBuilder<R,T,U extends BlockingQueue<PushEvent<? extends T>>>
extends Object
implements BufferBuilder<R,T,U>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PushbackPolicy<T,
U> protected U
protected QueuePolicy<T,
U> protected int
protected ScheduledExecutorService
protected Executor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBufferBuilder<R,
T, U> withBuffer
(U queue) The BlockingQueue implementation to use as a bufferBufferBuilder<R,
T, U> withExecutor
(Executor executor) Set theExecutor
that should be used to deliver events from this bufferBufferBuilder<R,
T, U> withParallelism
(int parallelism) Set the maximum permitted number of concurrent event deliveries allowed from this bufferBufferBuilder<R,
T, U> withPushbackPolicy
(PushbackPolicy<T, U> pushbackPolicy) Set thePushbackPolicy
of this builderBufferBuilder<R,
T, U> withPushbackPolicy
(PushbackPolicyOption pushbackPolicyOption, long time) Set thePushbackPolicy
of this builderBufferBuilder<R,
T, U> withQueuePolicy
(QueuePolicy<T, U> queuePolicy) Set theQueuePolicy
of this BuilderBufferBuilder<R,
T, U> withQueuePolicy
(QueuePolicyOption queuePolicyOption) Set theQueuePolicy
of this BuilderBufferBuilder<R,
T, U> withScheduler
(ScheduledExecutorService scheduler) Set theScheduledExecutorService
that should be used to trigger timed events after this bufferMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.osgi.util.pushstream.BufferBuilder
build
-
Field Details
-
worker
-
timer
-
concurrency
protected int concurrency -
backPressure
-
bufferingPolicy
-
buffer
-
-
Constructor Details
-
AbstractBufferBuilder
AbstractBufferBuilder()
-
-
Method Details
-
withBuffer
Description copied from interface:BufferBuilder
The BlockingQueue implementation to use as a buffer- Specified by:
withBuffer
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withQueuePolicy
Description copied from interface:BufferBuilder
Set theQueuePolicy
of this Builder- Specified by:
withQueuePolicy
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withQueuePolicy
Description copied from interface:BufferBuilder
Set theQueuePolicy
of this Builder- Specified by:
withQueuePolicy
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withPushbackPolicy
Description copied from interface:BufferBuilder
Set thePushbackPolicy
of this builder- Specified by:
withPushbackPolicy
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withPushbackPolicy
public BufferBuilder<R,T, withPushbackPolicyU> (PushbackPolicyOption pushbackPolicyOption, long time) Description copied from interface:BufferBuilder
Set thePushbackPolicy
of this builder- Specified by:
withPushbackPolicy
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withParallelism
Description copied from interface:BufferBuilder
Set the maximum permitted number of concurrent event deliveries allowed from this buffer- Specified by:
withParallelism
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withExecutor
Description copied from interface:BufferBuilder
Set theExecutor
that should be used to deliver events from this buffer- Specified by:
withExecutor
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-
withScheduler
Description copied from interface:BufferBuilder
Set theScheduledExecutorService
that should be used to trigger timed events after this buffer- Specified by:
withScheduler
in interfaceBufferBuilder<R,
T, U extends BlockingQueue<PushEvent<? extends T>>> - Returns:
- this builder
-