public class Pool extends Object
Each data set constructed using the Stream Factory will maintain a pool of readers in order to perform device lookup and retrieve various entities.
Used by the BaseList of type T to provide multiple readers for the list.
The Dataset must be disposed of to ensure the readers in the pool are closed.
Objects of this class should not be created directly as they are part of the internal logic.
The concept of the pool is slightly different to that, used in our C API. The C API also maintains a pool, but it is a pool of work sets where each work set is constructed from the data set and contains device information relevant to the device being detected. This pool only contains readers.
| Modifier and Type | Method and Description |
|---|---|
BinaryReader |
getReader()
Returns a reader to the temp file for exclusive use.
|
int |
getReadersCreated()
The number of readers that have been created.
|
int |
getReadersQueued()
Returns The number of readers in the queue.
|
void |
release(BinaryReader reader)
Returns the reader to the pool to be used by another process later.
|
public BinaryReader getReader() throws IOException
IOException - if there was a problem accessing data file.public void release(BinaryReader reader)
reader - Reader open and ready to read from the temp filepublic int getReadersCreated()
public int getReadersQueued()
Copyright © 2015 51Degrees. All rights reserved.