public static class QueueInputStream.Builder extends AbstractStreamBuilder<QueueInputStream,QueueInputStream.Builder>
QueueInputStream instance.
For example:
QueueInputStream s = QueueInputStream.builder()
.setBlockingQueue(new LinkedBlockingQueue<>())
.setTimeout(Duration.ZERO)
.get();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
QueueInputStream |
get()
Constructs a new instance.
|
QueueInputStream.Builder |
setBlockingQueue(BlockingQueue<Integer> blockingQueue)
Sets backing queue for the stream.
|
QueueInputStream.Builder |
setTimeout(Duration timeout)
Sets the polling timeout.
|
getBufferSize, getBufferSizeDefault, getCharSequence, getCharset, getCharsetDefault, getInputStream, getOpenOptions, getOutputStream, getPath, getWriter, setBufferSize, setBufferSize, setBufferSizeDefault, setCharset, setCharset, setCharsetDefault, setOpenOptionscheckOrigin, getOrigin, hasOrigin, newByteArrayOrigin, newCharSequenceOrigin, newFileOrigin, newFileOrigin, newInputStreamOrigin, newOutputStreamOrigin, newPathOrigin, newPathOrigin, newReaderOrigin, newURIOrigin, newWriterOrigin, setByteArray, setCharSequence, setFile, setFile, setInputStream, setOrigin, setOutputStream, setPath, setPath, setReader, setURI, setWriterasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasSupplierpublic Builder()
public QueueInputStream get()
This builder use the aspects BlockingQueue and timeout.
public QueueInputStream.Builder setBlockingQueue(BlockingQueue<Integer> blockingQueue)
blockingQueue - backing queue for the stream.public QueueInputStream.Builder setTimeout(Duration timeout)
timeout - the polling timeout.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.