Top Description Methods
org.osgi.util.pushstream

public Interface PushStreamBuilder<T, U extends BlockingQueue<PushEvent<? extends T>>>

extends BufferBuilder<PushStream<T>, T, U extends BlockingQueue<PushEvent<? extends T>>>
Known Direct Implementers
org.osgi.util.pushstream.PushStreamBuilderImpl
Annotations
@ProviderType
Type Parameters
<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

A Builder for a PushStream. This Builder extends the support of a standard BufferBuilder by allowing the PushStream to be unbuffered.

Method Summary

Modifier and TypeMethod and Description
public PushStreamBuilder<T, U>

Returns:

the builder
unbuffered
()

Tells this PushStreamBuilder to create an unbuffered stream which delivers events directly to its consumer using the incoming delivery thread.

public PushStreamBuilder<T, U>
withBuffer(U queue)

Redeclares org.osgi.util.pushstream.BufferBuilder.withBuffer.

The BlockingQueue implementation to use as a buffer

public PushStreamBuilder<T, U>
withExecutor(Executor executor)

Redeclares org.osgi.util.pushstream.BufferBuilder.withExecutor.

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

public PushStreamBuilder<T, U>
withParallelism(int parallelism)

Redeclares org.osgi.util.pushstream.BufferBuilder.withParallelism.

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

public PushStreamBuilder<T, U>
public PushStreamBuilder<T, U>
public PushStreamBuilder<T, U>
public PushStreamBuilder<T, U>
public PushStreamBuilder<T, U>
withScheduler(ScheduledExecutorService scheduler)

Redeclares org.osgi.util.pushstream.BufferBuilder.withScheduler.

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

Inherited from org.osgi.util.pushstream.BufferBuilder:
build

Method Detail

unbufferedback to summary
public PushStreamBuilder<T, U> unbuffered()

Tells this 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.
Returns:PushStreamBuilder<T, U>

the builder

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

Redeclares org.osgi.util.pushstream.BufferBuilder.withBuffer.

Doc from org.osgi.util.pushstream.BufferBuilder.withBuffer.

The BlockingQueue implementation to use as a buffer

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withExecutorback to summary
public PushStreamBuilder<T, U> withExecutor(Executor executor)

Redeclares org.osgi.util.pushstream.BufferBuilder.withExecutor.

Doc from org.osgi.util.pushstream.BufferBuilder.withExecutor.

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

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withParallelismback to summary
public PushStreamBuilder<T, U> withParallelism(int parallelism)

Redeclares org.osgi.util.pushstream.BufferBuilder.withParallelism.

Doc from org.osgi.util.pushstream.BufferBuilder.withParallelism.

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

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withPushbackPolicyback to summary
public PushStreamBuilder<T, U> withPushbackPolicy(PushbackPolicy<T, U> pushbackPolicy)

Redeclares org.osgi.util.pushstream.BufferBuilder.withPushbackPolicy.

Doc from org.osgi.util.pushstream.BufferBuilder.withPushbackPolicy.

Set the PushbackPolicy of this builder

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withPushbackPolicyback to summary
public PushStreamBuilder<T, U> withPushbackPolicy(PushbackPolicyOption pushbackPolicyOption, long time)

Redeclares org.osgi.util.pushstream.BufferBuilder.withPushbackPolicy.

Doc from org.osgi.util.pushstream.BufferBuilder.withPushbackPolicy.

Set the PushbackPolicy of this builder

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withQueuePolicyback to summary
public PushStreamBuilder<T, U> withQueuePolicy(QueuePolicy<T, U> queuePolicy)

Redeclares org.osgi.util.pushstream.BufferBuilder.withQueuePolicy.

Doc from org.osgi.util.pushstream.BufferBuilder.withQueuePolicy.

Set the QueuePolicy of this Builder

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withQueuePolicyback to summary
public PushStreamBuilder<T, U> withQueuePolicy(QueuePolicyOption queuePolicyOption)

Redeclares org.osgi.util.pushstream.BufferBuilder.withQueuePolicy.

Doc from org.osgi.util.pushstream.BufferBuilder.withQueuePolicy.

Set the QueuePolicy of this Builder

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override
withSchedulerback to summary
public PushStreamBuilder<T, U> withScheduler(ScheduledExecutorService scheduler)

Redeclares org.osgi.util.pushstream.BufferBuilder.withScheduler.

Doc from org.osgi.util.pushstream.BufferBuilder.withScheduler.

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

Returns:PushStreamBuilder<T, U>

this builder

Annotations
@Override