public class AsyncStreamBuilder<T> extends Object
| Constructor and Description |
|---|
AsyncStreamBuilder(long count)
Builder for default timeout 1 minute
|
AsyncStreamBuilder(long count,
Duration timeout)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T item)
Thread save method to add new item to the result Stream.
|
void |
addAll(T... items)
Thread save method to add new item to the result Stream.
|
protected void |
close()
Close the builder
|
protected T |
get()
Get a next value
|
void |
interrupt(Throwable causedBy)
Interrupt the next processing and close input
|
protected boolean |
isOpen()
Returns an open state of the builder
|
Stream<T> |
stream()
Start time countdown
|
public AsyncStreamBuilder(long count)
@Nonnull protected T get() throws JobException
JobException - The method throws the exeption on a closed builder or an interrupted requestpublic void addAll(@Nonnull T... items)
public void add(@Nullable T item)
protected final void close()
protected final boolean isOpen()
Copyright 2015, Pavel Ponec