IN - the input data type.OUT - the output data type.public interface StreamingChannel<IN,OUT> extends IOChannel<IN,OUT>
Channel.InputChannel<IN>, Channel.OutputChannel<OUT>| Modifier and Type | Method and Description |
|---|---|
StreamingChannel<IN,OUT> |
after(long delay,
TimeUnit timeUnit)
Tells the channel to delay the transfer of data of the specified time duration.
Note that an abortion command will be delayed as well. |
StreamingChannel<IN,OUT> |
after(TimeDuration delay)
Tells the channel to delay the transfer of data of the specified time duration.
Note that an abortion command will be delayed as well. |
StreamingChannel<IN,OUT> |
afterMax(long timeout,
TimeUnit timeUnit)
Tells the channel to wait at the max the specified time duration for the next result to
be available.
|
StreamingChannel<IN,OUT> |
afterMax(TimeDuration timeout)
Tells the channel to wait at the max the specified time duration for the next result to
be available.
|
StreamingChannel<IN,OUT> |
allInto(Collection<? super OUT> results)
Consumes all the results by waiting for the routine to complete at the maximum for the
set timeout, and put them into the specified collection.
|
StreamingChannel<IN,OUT> |
close()
Closes the channel input.
If the channel is already closed, this method has no effect. |
<BEFORE> StreamingChannel<BEFORE,OUT> |
combine(IOChannel<BEFORE,? extends IN> channel)
Creates a new streaming channel which is the concatenation of the specified channel and this
one.
|
<AFTER> StreamingChannel<IN,AFTER> |
concat(IOChannel<? super OUT,AFTER> channel)
Creates a new streaming channel which is the concatenation of this channel and the specified
one.
|
StreamingChannel<IN,OUT> |
eventuallyAbort()
Tells the channel to abort the invocation execution in case no result is available before
the timeout has elapsed.
|
StreamingChannel<IN,OUT> |
eventuallyAbort(Throwable reason)
Tells the channel to abort the invocation execution in case no result is available before
the timeout has elapsed.
|
StreamingChannel<IN,OUT> |
eventuallyExit()
Tells the channel to break execution in case no result is available before the timeout
has elapsed.
|
StreamingChannel<IN,OUT> |
eventuallyThrow()
Tells the channel to throw an
ExecutionTimeoutException in case no result is available before the timeout has elapsed. |
StreamingChannel<IN,OUT> |
immediately()
Tells the channel to not wait for results to be available.
|
StreamingChannel<IN,OUT> |
now()
Tells the channel to not delay the transfer of data.
|
StreamingChannel<IN,OUT> |
orderByCall()
Tells the channel to sort the passed input data based on the order of the calls to the
pass methods.
|
StreamingChannel<IN,OUT> |
orderByChance()
Tells the channel to avoid sorting the passed input in any particular order.
|
StreamingChannel<IN,OUT> |
orderByDelay()
Tells the channel to sort the passed input data based on the specific delay.
Note that only the inputs passed with a 0 delay will be delivered in the same order as they are passed to the channel, while the others will be delivered as soon as the dedicated runner handles the specific execution. |
StreamingChannel<IN,OUT> |
pass(Channel.OutputChannel<? extends IN> channel)
Passes the data returned by the specified channel to this one.
|
StreamingChannel<IN,OUT> |
pass(IN... inputs)
Passes the specified input data to this channel.
|
StreamingChannel<IN,OUT> |
pass(IN input)
Passes the specified input to this channel.
|
StreamingChannel<IN,OUT> |
pass(Iterable<? extends IN> inputs)
Passes the data returned by the specified iterable to this channel.
|
StreamingChannel<IN,OUT> |
passTo(OutputConsumer<? super OUT> consumer)
Binds this channel to the specified consumer.
|
StreamingChannel<IN,OUT> |
skip(int count)
Skips the first
count available results by waiting at the maximum for the set
timeout. |
all, checkComplete, hasNext, isBound, next, next, passTo@NotNull StreamingChannel<IN,OUT> after(@NotNull TimeDuration delay)
@NotNull StreamingChannel<IN,OUT> after(long delay, @NotNull TimeUnit timeUnit)
@NotNull StreamingChannel<IN,OUT> now()
@NotNull StreamingChannel<IN,OUT> orderByCall()
orderByCall in interface Channel.InputChannel<IN>orderByCall in interface IOChannel<IN,OUT>Channel.InputChannel.orderByChance(),
Channel.InputChannel.orderByDelay()@NotNull StreamingChannel<IN,OUT> orderByChance()
orderByChance in interface Channel.InputChannel<IN>orderByChance in interface IOChannel<IN,OUT>Channel.InputChannel.orderByCall(),
Channel.InputChannel.orderByDelay()@NotNull StreamingChannel<IN,OUT> orderByDelay()
orderByDelay in interface Channel.InputChannel<IN>orderByDelay in interface IOChannel<IN,OUT>Channel.InputChannel.orderByCall(),
Channel.InputChannel.orderByChance()@NotNull StreamingChannel<IN,OUT> pass(@Nullable Channel.OutputChannel<? extends IN> channel)
@NotNull StreamingChannel<IN,OUT> pass(@Nullable Iterable<? extends IN> inputs)
@NotNull StreamingChannel<IN,OUT> pass(@Nullable IN input)
@NotNull StreamingChannel<IN,OUT> pass(@Nullable IN... inputs)
@NotNull StreamingChannel<IN,OUT> afterMax(@NotNull TimeDuration timeout)
@NotNull StreamingChannel<IN,OUT> afterMax(long timeout, @NotNull TimeUnit timeUnit)
@NotNull StreamingChannel<IN,OUT> allInto(@NotNull Collection<? super OUT> results)
allInto in interface Channel.OutputChannel<OUT>allInto in interface IOChannel<IN,OUT>results - the collection to fill.Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(),
Channel.OutputChannel.eventuallyAbort(Throwable),
Channel.OutputChannel.eventuallyExit(),
Channel.OutputChannel.eventuallyThrow()@NotNull StreamingChannel<IN,OUT> eventuallyAbort()
ExecutionTimeoutException exception will be thrown.eventuallyAbort in interface Channel.OutputChannel<OUT>eventuallyAbort in interface IOChannel<IN,OUT>Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(Throwable),
Channel.OutputChannel.eventuallyExit(),
Channel.OutputChannel.eventuallyThrow()@NotNull StreamingChannel<IN,OUT> eventuallyAbort(@Nullable Throwable reason)
ExecutionTimeoutException exception will be thrown.eventuallyAbort in interface Channel.OutputChannel<OUT>eventuallyAbort in interface IOChannel<IN,OUT>reason - the throwable object identifying the reason of the invocation abortion.Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(),
Channel.OutputChannel.eventuallyExit(),
Channel.OutputChannel.eventuallyThrow()@NotNull StreamingChannel<IN,OUT> eventuallyExit()
ExecutionTimeoutException exception will be thrown.eventuallyExit in interface Channel.OutputChannel<OUT>eventuallyExit in interface IOChannel<IN,OUT>Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(),
Channel.OutputChannel.eventuallyAbort(Throwable),
Channel.OutputChannel.eventuallyThrow()@NotNull StreamingChannel<IN,OUT> eventuallyThrow()
ExecutionTimeoutException in case no result is available before the timeout has elapsed.
This is the default behavior.eventuallyThrow in interface Channel.OutputChannel<OUT>eventuallyThrow in interface IOChannel<IN,OUT>Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(),
Channel.OutputChannel.eventuallyAbort(Throwable),
Channel.OutputChannel.eventuallyExit()@NotNull StreamingChannel<IN,OUT> immediately()
immediately in interface Channel.OutputChannel<OUT>immediately in interface IOChannel<IN,OUT>@NotNull StreamingChannel<IN,OUT> passTo(@NotNull OutputConsumer<? super OUT> consumer)
IllegalStateException to be thrown.@NotNull StreamingChannel<IN,OUT> skip(int count)
count available results by waiting at the maximum for the set
timeout.skip in interface Channel.OutputChannel<OUT>skip in interface IOChannel<IN,OUT>Channel.OutputChannel.afterMax(TimeDuration),
Channel.OutputChannel.afterMax(long, TimeUnit),
Channel.OutputChannel.immediately(),
Channel.OutputChannel.eventuallyAbort(),
Channel.OutputChannel.eventuallyAbort(Throwable),
Channel.OutputChannel.eventuallyExit(),
Channel.OutputChannel.eventuallyThrow()@NotNull StreamingChannel<IN,OUT> close()
@NotNull <BEFORE> StreamingChannel<BEFORE,OUT> combine(@NotNull IOChannel<BEFORE,? extends IN> channel)
BEFORE - the concatenation input type.channel - the channel after which to concatenate this one.@NotNull <AFTER> StreamingChannel<IN,AFTER> concat(@NotNull IOChannel<? super OUT,AFTER> channel)
AFTER - the concatenation output type.channel - the channel to concatenate after this one.