T
- The type of objects in the PushEvent
U
- The type of the Queue used in the user specified buffer@ProviderType public interface PushStreamBuilder<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> extends BufferBuilder<PushStream<T>,T,U>
Modifier and Type | Method and Description |
---|---|
PushStreamBuilder<T,U> |
unbuffered()
Tells this
PushStreamBuilder to create an unbuffered stream which
delivers events directly to its consumer using the incoming delivery
thread. |
PushStreamBuilder<T,U> |
withBuffer(U queue)
The BlockingQueue implementation to use as a buffer
|
PushStreamBuilder<T,U> |
withExecutor(java.util.concurrent.Executor executor)
Set the
Executor that should be used to deliver events from this
buffer |
PushStreamBuilder<T,U> |
withParallelism(int parallelism)
Set the maximum permitted number of concurrent event deliveries allowed
from this buffer
|
PushStreamBuilder<T,U> |
withPushbackPolicy(PushbackPolicy<T,U> pushbackPolicy)
Set the
PushbackPolicy of this builder |
PushStreamBuilder<T,U> |
withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption,
long time)
Set the
PushbackPolicy of this builder |
PushStreamBuilder<T,U> |
withQueuePolicy(QueuePolicy<T,U> queuePolicy)
Set the
QueuePolicy of this Builder |
PushStreamBuilder<T,U> |
withQueuePolicy(QueuePolicyOption queuePolicyOption)
Set the
QueuePolicy of this Builder |
PushStreamBuilder<T,U> |
withScheduler(java.util.concurrent.ScheduledExecutorService scheduler)
Set the
ScheduledExecutorService that should be used to trigger
timed events after this buffer |
build
PushStreamBuilder<T,U> unbuffered()
PushStreamBuilder
to create an unbuffered stream which
delivers events directly to its consumer using the incoming delivery
thread. Setting the PushStreamBuilder
to be unbuffered means that
any buffer, queue policy or push back policy will be ignored. Note that
calling one of:
after this method will reset this builder to require a buffer.PushStreamBuilder<T,U> withBuffer(U queue)
BufferBuilder
withBuffer
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withQueuePolicy(QueuePolicy<T,U> queuePolicy)
BufferBuilder
QueuePolicy
of this BuilderwithQueuePolicy
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withQueuePolicy(QueuePolicyOption queuePolicyOption)
BufferBuilder
QueuePolicy
of this BuilderwithQueuePolicy
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withPushbackPolicy(PushbackPolicy<T,U> pushbackPolicy)
BufferBuilder
PushbackPolicy
of this builderwithPushbackPolicy
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption, long time)
BufferBuilder
PushbackPolicy
of this builderwithPushbackPolicy
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withParallelism(int parallelism)
BufferBuilder
withParallelism
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withExecutor(java.util.concurrent.Executor executor)
BufferBuilder
Executor
that should be used to deliver events from this
bufferwithExecutor
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
PushStreamBuilder<T,U> withScheduler(java.util.concurrent.ScheduledExecutorService scheduler)
BufferBuilder
ScheduledExecutorService
that should be used to trigger
timed events after this bufferwithScheduler
in interface BufferBuilder<PushStream<T>,T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0