public class TriePool extends Object implements Closeable
Used by the BaseList of type T to provide multiple readers for the list.
The DetectorDataSet must be disposed of to ensure the readers in the pool are closed.
| Constructor and Description |
|---|
TriePool(TrieSource source)
Constructs a new pool of readers for the source provided.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying data file channels.
|
TrieReader |
getReader()
Returns a reader to the temp file for exclusive use.
|
void |
release(TrieReader reader)
Returns the reader to the pool to be used by another process later.
|
public TriePool(TrieSource source)
source - The data source for the listpublic TrieReader getReader() throws IOException
IOException - indicates an I/O exception occurredpublic void release(TrieReader reader)
reader - Reader open and ready to read from the temp filepublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2017 51Degrees. All rights reserved.