Package | Description |
---|---|
org.osgi.service.log.stream |
Log Stream Package Version 1.0.
|
org.osgi.util.pushstream |
Push Stream Package Version 1.0.
|
Modifier and Type | Method and Description |
---|---|
PushStream<LogEntry> |
LogStreamProvider.createStream(LogStreamProvider.Options... options)
Create a
PushStream of LogEntry objects. |
Modifier and Type | Method and Description |
---|---|
PushStream<T> |
PushStream.adjustBackPressure(java.util.function.LongUnaryOperator adjustment)
Changes the back-pressure propagated by this pipeline stage.
|
PushStream<T> |
PushStream.adjustBackPressure(java.util.function.ToLongBiFunction<T,java.lang.Long> adjustment)
Changes the back-pressure propagated by this pipeline stage.
|
<R> PushStream<R> |
PushStream.asyncMap(int n,
int delay,
Function<? super T,Promise<? extends R>> mapper)
Asynchronously map the payload values.
|
PushStream<T> |
PushStream.buffer()
Buffer the events in a queue using default values for the queue size and
other behaviors.
|
<R> PushStream<R> |
PushStream.coalesce(Function<? super T,java.util.Optional<R>> f)
Coalesces a number of events into a new type of event.
|
<R> PushStream<R> |
PushStream.coalesce(int count,
Function<java.util.Collection<T>,R> f)
Coalesces a number of events into a new type of event.
|
<R> PushStream<R> |
PushStream.coalesce(java.util.function.IntSupplier count,
Function<java.util.Collection<T>,R> f)
Coalesces a number of events into a new type of event.
|
<T> PushStream<T> |
PushStreamProvider.createStream(PushEventSource<T> eventSource)
Create a stream with the default configured buffer, executor size, queue,
queue policy and pushback policy.
|
PushStream<T> |
PushStream.distinct()
Remove any duplicates.
|
PushStream<T> |
PushStream.filter(Predicate<? super T> predicate)
Only pass events downstream when the predicate tests true.
|
<R> PushStream<R> |
PushStream.flatMap(Function<? super T,? extends PushStream<? extends R>> mapper)
Flat map the payload value (turn one event into 0..n events of
potentially another type).
|
PushStream<T> |
PushStream.fork(int n,
int delay,
java.util.concurrent.Executor e)
Execute the downstream events in up to n background threads.
|
PushStream<T> |
PushStream.limit(java.time.Duration maxTime)
Automatically close the channel after the given amount of time has
elapsed.
|
PushStream<T> |
PushStream.limit(long maxSize)
Automatically close the channel after the maxSize number of elements is
received.
|
<R> PushStream<R> |
PushStream.map(Function<? super T,? extends R> mapper)
Map a payload value.
|
PushStream<T> |
PushStream.merge(PushEventSource<? extends T> source)
Merge in the events from another source.
|
PushStream<T> |
PushStream.merge(PushStream<? extends T> source)
Merge in the events from another PushStream.
|
PushStream<T> |
PushStream.onClose(java.lang.Runnable closeHandler)
Must be run after the channel is closed.
|
PushStream<T> |
PushStream.onError(java.util.function.Consumer<? super java.lang.Throwable> closeHandler)
Must be run after the channel is closed.
|
PushStream<T> |
PushStream.sequential()
Ensure that any events are delivered sequentially.
|
PushStream<T> |
PushStream.skip(long n)
Skip a number of events in the channel.
|
PushStream<T> |
PushStream.sorted()
Sorted the elements, assuming that T extends Comparable.
|
PushStream<T> |
PushStream.sorted(java.util.Comparator<? super T> comparator)
Sorted the elements with the given comparator.
|
PushStream<T>[] |
PushStream.split(Predicate<? super T>... predicates)
Split the events to different streams based on a predicate.
|
<T> PushStream<T> |
PushStreamProvider.streamOf(java.util.concurrent.Executor executor,
java.util.concurrent.ScheduledExecutorService scheduler,
java.util.stream.Stream<T> items)
Create an Unbuffered
PushStream from a Java Stream The
data from the stream will be pushed into the PushStream asynchronously
using the supplied Executor. |
<T> PushStream<T> |
PushStreamProvider.streamOf(java.util.stream.Stream<T> items)
Create an Unbuffered
PushStream from a Java Stream The
data from the stream will be pushed into the PushStream synchronously as
it is opened. |
PushStream<T> |
PushStream.timeout(java.time.Duration idleTime)
Automatically fail the channel if no events are received for the
indicated length of time.
|
<R> PushStream<R> |
PushStream.window(java.time.Duration d,
java.util.concurrent.Executor executor,
Function<java.util.Collection<T>,R> f)
Buffers a number of events over a fixed time interval and then forwards
the events to an accumulator function.
|
<R> PushStream<R> |
PushStream.window(java.time.Duration d,
Function<java.util.Collection<T>,R> f)
Buffers a number of events over a fixed time interval and then forwards
the events to an accumulator function.
|
<R> PushStream<R> |
PushStream.window(java.util.function.Supplier<java.time.Duration> timeSupplier,
java.util.function.IntSupplier maxEvents,
java.util.function.BiFunction<java.lang.Long,java.util.Collection<T>,R> f)
Buffers a number of events over a variable time interval and then
forwards the events to an accumulator function.
|
<R> PushStream<R> |
PushStream.window(java.util.function.Supplier<java.time.Duration> timeSupplier,
java.util.function.IntSupplier maxEvents,
java.util.concurrent.Executor executor,
java.util.function.BiFunction<java.lang.Long,java.util.Collection<T>,R> f)
Buffers a number of events over a variable time interval and then
forwards the events to an accumulator function.
|
Modifier and Type | Method and Description |
---|---|
<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> |
PushStreamProvider.buildEventSourceFromStream(PushStream<T> stream)
Convert an
PushStream into an PushEventSource . |
<T> PushEventSource<T> |
PushStreamProvider.createEventSourceFromStream(PushStream<T> stream)
Convert an
PushStream into an PushEventSource . |
PushStream<T> |
PushStream.merge(PushStream<? extends T> source)
Merge in the events from another PushStream.
|
Modifier and Type | Method and Description |
---|---|
<R> PushStream<R> |
PushStream.flatMap(Function<? super T,? extends PushStream<? extends R>> mapper)
Flat map the payload value (turn one event into 0..n events of
potentially another type).
|
Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0