public class Pool extends Object implements Disposable
Used by the BaseList The
DetectorDataSet must be disposed of to ensure the readers in the pool are
closed.
| Modifier and Type | Field and Description |
|---|---|
private Queue<BinaryReader> |
readers |
private Source |
source |
| Constructor and Description |
|---|
Pool(Source source)
Constructs a new pool of readers for the source provided.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
(package private) BinaryReader |
getReader()
Returns a reader to the temp file for exclusive use.
|
(package private) void |
release(BinaryReader reader)
Returns the reader to the pool to be used by another process later.
|
private final Queue<BinaryReader> readers
private final Source source
Pool(Source source)
source - The data source for the listBinaryReader getReader() throws IOException
IOExceptionvoid release(BinaryReader reader)
reader - Reader open and ready to read from the temp filepublic void dispose()
dispose in interface Disposable