public class ParallelReader extends Reader
| Modifier and Type | Class and Description |
|---|---|
static interface |
ParallelReader.WaitingStrategy |
| Constructor and Description |
|---|
ParallelReader(Reader reader)
Create a new ParallelReader that will fetch the data from that reader in a another thread.
|
ParallelReader(Reader reader,
Executor executorService) |
ParallelReader(Reader reader,
Executor executorService,
int bufferSize) |
ParallelReader(Reader reader,
Executor executorService,
int bufferSize,
int readBufferSize) |
ParallelReader(Reader reader,
Executor executorService,
int bufferSize,
int readBufferSize,
ParallelReader.WaitingStrategy waitingStrategy)
Create a new ParallelReader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static Executor |
getDefaultExecutor() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
public ParallelReader(Reader reader)
reader - the readerpublic ParallelReader(Reader reader, Executor executorService, int bufferSize, int readBufferSize)
public ParallelReader(Reader reader, Executor executorService, int bufferSize, int readBufferSize, ParallelReader.WaitingStrategy waitingStrategy)
reader - the readerexecutorService - the executor to fetch frombufferSize - the size of the ring bufferreadBufferSize - the size of the buffer to fetch datawaitingStrategy - the waiting strategy when the ring buffer is fullpublic static Executor getDefaultExecutor()
public int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionCopyright © 2019. All rights reserved.