public static class StreamConsumer.Phoenix<T> extends Object implements StreamConsumer<T>
StreamConsumer.ClosedHandlerSupport<T>, StreamConsumer.CloseHandlerSupport<T>, StreamConsumer.ListCollector<T>, StreamConsumer.NoBackpressure<T>, StreamConsumer.Phoenix<T>, StreamConsumer.ProcessorAsync<T>, StreamConsumer.ProcessorSync<T>, StreamConsumer.UnionSeq<T>, StreamConsumer.VoidConsumer<T>, StreamConsumer.WrapAdapter<T>
Constructor and Description |
---|
Phoenix(StreamConsumer<T> consumer,
BiConsumer<Runnable,Long> scheduler) |
Phoenix(StreamConsumer<T> consumer,
BiConsumer<Runnable,Long> scheduler,
org.apache.logging.log4j.Logger log) |
Phoenix(StreamConsumer<T> consumer,
int startMS,
int stepMS,
int maxMS,
BiConsumer<Runnable,Long> scheduler) |
Phoenix(StreamConsumer<T> consumer,
int startMS,
int stepMS,
int maxMS,
BiConsumer<Runnable,Long> scheduler,
org.apache.logging.log4j.Logger log) |
Modifier and Type | Method and Description |
---|---|
void |
accept(T next)
Consumes an event.
|
void |
close(Throwable error)
Closes the consumer with
null on normal, not exceptional, close
or with an error on abnormal close. |
void |
flush()
The streams that receive / support flush pattern shall call
StreamConsumer.flush() method in order to
specify that a batch was completed. |
void |
opened(StreamHandler handler)
Notifies that stream is opened and passes request and close handler.
|
void |
start(Consumer<StreamConsumer<T>> stream) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authCtxAware, buffered, filterForwarder, mapForwarder, mapForwarder
public Phoenix(StreamConsumer<T> consumer, BiConsumer<Runnable,Long> scheduler)
public Phoenix(StreamConsumer<T> consumer, BiConsumer<Runnable,Long> scheduler, org.apache.logging.log4j.Logger log)
public Phoenix(StreamConsumer<T> consumer, int startMS, int stepMS, int maxMS, BiConsumer<Runnable,Long> scheduler)
public Phoenix(StreamConsumer<T> consumer, int startMS, int stepMS, int maxMS, BiConsumer<Runnable,Long> scheduler, org.apache.logging.log4j.Logger log)
public void start(Consumer<StreamConsumer<T>> stream)
public void opened(StreamHandler handler)
StreamConsumer
opened
in interface StreamConsumer<T>
handler
- stream handlerpublic void accept(T next)
StreamConsumer
public void close(Throwable error)
StreamConsumer
null
on normal, not exceptional, close
or with an error on abnormal close.close
in interface StreamConsumer<T>
error
- null
if normal close or an error if abnormal termination occurred.public void flush()
StreamConsumer
StreamConsumer.flush()
method in order to
specify that a batch was completed. This allows such consumers to implement some buffer logic.flush
in interface StreamConsumer<T>
Copyright © 2022 Bosch.IO GmbH. All rights reserved.