Top Description Methods
org.osgi.util.pushstream

public Interface BufferBuilder<R, T, U extends BlockingQueue<PushEvent<? extends T>>>

Known Direct Subinterfaces
org.osgi.util.pushstream.PushStreamBuilder
Known Direct Implementers
org.osgi.util.pushstream.AbstractBufferBuilder
Annotations
@ProviderType
Type Parameters
<R>
The type of object being built
<T>
The type of objects in the PushEvent
<U>
The type of the Queue used in the user specified buffer
Imports
java.util.concurrent.BlockingQueue, .Executor, .ScheduledExecutorService, org.osgi.annotation.versioning.ProviderType

Create a buffered section of a Push-based stream

Method Summary

Modifier and TypeMethod and Description
public R

Returns:

the object being built
build
()

public BufferBuilder<R, T, U>

Returns:

this builder
withBuffer
(U queue)

The BlockingQueue implementation to use as a buffer

public BufferBuilder<R, T, U>

Returns:

this builder
withExecutor
(Executor executor)

Set the Executor that should be used to deliver events from this buffer

public BufferBuilder<R, T, U>

Returns:

this builder
withParallelism
(int parallelism)

Set the maximum permitted number of concurrent event deliveries allowed from this buffer

public BufferBuilder<R, T, U>

Returns:

this builder
withPushbackPolicy
(PushbackPolicy<T, U> pushbackPolicy)

Set the PushbackPolicy of this builder

public BufferBuilder<R, T, U>

Returns:

this builder
withPushbackPolicy
(PushbackPolicyOption pushbackPolicyOption, long time)

Set the PushbackPolicy of this builder

public BufferBuilder<R, T, U>

Returns:

this builder
withQueuePolicy
(QueuePolicy<T, U> queuePolicy)

Set the QueuePolicy of this Builder

public BufferBuilder<R, T, U>

Returns:

this builder
withQueuePolicy
(QueuePolicyOption queuePolicyOption)

Set the QueuePolicy of this Builder

public BufferBuilder<R, T, U>

Returns:

this builder
withScheduler
(ScheduledExecutorService scheduler)

Set the ScheduledExecutorService that should be used to trigger timed events after this buffer

Method Detail

buildback to summary
public R build()
Returns:R

the object being built

withBufferback to summary
public BufferBuilder<R, T, U> withBuffer(U queue)

The BlockingQueue implementation to use as a buffer

Returns:BufferBuilder<R, T, U>

this builder

withExecutorback to summary
public BufferBuilder<R, T, U> withExecutor(Executor executor)

Set the Executor that should be used to deliver events from this buffer

Returns:BufferBuilder<R, T, U>

this builder

withParallelismback to summary
public BufferBuilder<R, T, U> withParallelism(int parallelism)

Set the maximum permitted number of concurrent event deliveries allowed from this buffer

Returns:BufferBuilder<R, T, U>

this builder

withPushbackPolicyback to summary
public BufferBuilder<R, T, U> withPushbackPolicy(PushbackPolicy<T, U> pushbackPolicy)

Set the PushbackPolicy of this builder

Returns:BufferBuilder<R, T, U>

this builder

withPushbackPolicyback to summary
public BufferBuilder<R, T, U> withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption, long time)

Set the PushbackPolicy of this builder

Returns:BufferBuilder<R, T, U>

this builder

withQueuePolicyback to summary
public BufferBuilder<R, T, U> withQueuePolicy(QueuePolicy<T, U> queuePolicy)

Set the QueuePolicy of this Builder

Returns:BufferBuilder<R, T, U>

this builder

withQueuePolicyback to summary
public BufferBuilder<R, T, U> withQueuePolicy(QueuePolicyOption queuePolicyOption)

Set the QueuePolicy of this Builder

Returns:BufferBuilder<R, T, U>

this builder

withSchedulerback to summary
public BufferBuilder<R, T, U> withScheduler(ScheduledExecutorService scheduler)

Set the ScheduledExecutorService that should be used to trigger timed events after this buffer

Returns:BufferBuilder<R, T, U>

this builder