After constructing an instance of this class, the application
is can call readInt() to read one VL integer off the stream.
When the read operation completes, the application can call readInt
again, or call stop() to disconnect the reader.
| Modifier and Type | Field and Description |
|---|---|
| private CompletableFuture | |
| private final Logger | |
| private final QuicStreamReader | |
| private final SequentialScheduler | |
| private final QuicReceiverStream | |
| private ByteBuffer |
| Access | Constructor and Description |
|---|---|
| public | QuicStreamIntReader(QuicReceiverStream
a receiver stream with no connected reader stream, Logger a logger debug)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public synchronized CompletableFuture | Returns: aCompletableFuture<Long> that will be completed
with the decoded number, or -1 if the stream is terminated before
the complete number could be read, or an exception
if the stream is reset or decoding fails.Starts a read operation to decode a single number. |
| public synchronized void |
| cf | back to summary |
|---|---|
| private CompletableFuture<Long> cf | |
| debug | back to summary |
|---|---|
| private final Logger debug | |
| reader | back to summary |
|---|---|
| private final QuicStreamReader reader | |
| scheduler | back to summary |
|---|---|
| private final SequentialScheduler scheduler | |
| stream | back to summary |
|---|---|
| private final QuicReceiverStream stream | |
| vlongBuf | back to summary |
|---|---|
| private ByteBuffer vlongBuf | |
| QuicStreamIntReader | back to summary |
|---|---|
| public QuicStreamIntReader(QuicReceiverStream stream, Logger debug) Creates a
| |
| dispatch | back to summary |
|---|---|
| private void dispatch() | |
| readInt | back to summary |
|---|---|
| public synchronized CompletableFuture Starts a read operation to decode a single number.
| |
| stop | back to summary |
|---|---|
| public synchronized void stop() Stops and disconnects this reader. This operation must not be done when a read operation
is in progress. If cancelling a read operation is intended, use
| |