Top Fields Constructors Methods
org.osgi.util.pushstream

pack-priv Class PushStreamBuilderImpl<T, U extends BlockingQueue<PushEvent<? extends T>>>

extends AbstractBufferBuilder<PushStream<T>, T, U extends BlockingQueue<PushEvent<? extends T>>>
implements PushStreamBuilder<T, U extends BlockingQueue<PushEvent<? extends T>>>
Class Inheritance
All Implemented Interfaces
org.osgi.util.pushstream.PushStreamBuilder, org.osgi.util.pushstream.BufferBuilder
Imports
java.util.concurrent.BlockingQueue, .Executor, .ScheduledExecutorService

Field Summary

Modifier and TypeField and Description
private final PushEventSource<T>
private final Executor
private final ScheduledExecutorService
private final PushStreamProvider
private boolean
Inherited from org.osgi.util.pushstream.AbstractBufferBuilder:
backPressurebufferbufferingPolicyconcurrencytimerworker

Constructor Summary

AccessConstructor and Description
pack-priv
PushStreamBuilderImpl(PushStreamProvider psp, Executor defaultExecutor, ScheduledExecutorService defaultScheduler, PushEventSource<T> eventSource)

Method Summary

Modifier and TypeMethod and Description
public PushStream<T>
public PushStreamBuilder<T, U>
unbuffered()

Implements org.osgi.util.pushstream.PushStreamBuilder.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>
public PushStreamBuilder<T, U>
public PushStreamBuilder<T, U>
withParallelism(int parallelism)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withParallelism.

Implements org.osgi.util.pushstream.PushStreamBuilder.withParallelism, 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>

Field Detail

eventSourceback to summary
private final PushEventSource<T> eventSource
previousExecutorback to summary
private final Executor previousExecutor
previousSchedulerback to summary
private final ScheduledExecutorService previousScheduler
pspback to summary
private final PushStreamProvider psp
unbufferedback to summary
private boolean unbuffered

Constructor Detail

PushStreamBuilderImplback to summary
pack-priv PushStreamBuilderImpl(PushStreamProvider psp, Executor defaultExecutor, ScheduledExecutorService defaultScheduler, PushEventSource<T> eventSource)

Method Detail

buildback to summary
public PushStream<T> build()

Implements org.osgi.util.pushstream.BufferBuilder.build.

Returns:PushStream<T>

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

the object being built

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

Implements org.osgi.util.pushstream.PushStreamBuilder.unbuffered.

Doc from org.osgi.util.pushstream.PushStreamBuilder.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

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

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withBuffer.

Implements org.osgi.util.pushstream.PushStreamBuilder.withBuffer, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withExecutor.

Implements org.osgi.util.pushstream.PushStreamBuilder.withExecutor, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withParallelism.

Implements org.osgi.util.pushstream.PushStreamBuilder.withParallelism, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withPushbackPolicy.

Implements org.osgi.util.pushstream.PushStreamBuilder.withPushbackPolicy, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withPushbackPolicy.

Implements org.osgi.util.pushstream.PushStreamBuilder.withPushbackPolicy, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withQueuePolicy.

Implements org.osgi.util.pushstream.PushStreamBuilder.withQueuePolicy, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withQueuePolicy.

Implements org.osgi.util.pushstream.PushStreamBuilder.withQueuePolicy, 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)

Overrides org.osgi.util.pushstream.AbstractBufferBuilder.withScheduler.

Implements org.osgi.util.pushstream.PushStreamBuilder.withScheduler, 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