gov.nist.nlpir.irf.index.braf
Class LinkedListPool
java.lang.Object
|
+--gov.nist.nlpir.irf.index.braf.LinkedListPool
- public class LinkedListPool
- extends java.lang.Object
Pool of multiple linked lists.
- Version:
- $Revision: 1.5 $
- Author:
- This software was produced by NIST, an agency of the
U.S. government, and by statute is not subject to copyright in the
United States. Recipients of this software assume all
responsibilities associated with its operation, modification and
maintenance.
Method Summary |
java.util.Vector |
getList(gov.nist.nlpir.irf.handle.braf.FeatureListBrafHandle handle)
|
private void |
openPoolFile()
|
void |
put(gov.nist.nlpir.irf.handle.braf.FeatureListBrafHandle handle,
ProxyIndexingFeature value)
Stores an object which conforms to the ProxyIndexingFeature class. |
void |
shutdown()
Needs to be called before the class disappears, otherwise the file will
be corrupted. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
nextOffset
long nextOffset
poolFileName
java.lang.String poolFileName
poolFile
BufferedRandomAccessFile poolFile
- The file in which every feature list will be stored.
END_MARKER
public static long END_MARKER
- The local equivalent of
null
LinkedListPool
public LinkedListPool(java.lang.String poolFileSpec)
- Parameters:
poolFilePrefix
- prefix of poolFile file name.initialize
- true if building a new listpool
openPoolFile
private void openPoolFile()
- Parameters:
initialize
- true if building a new listpool
called if poolFile file needs to be opened, usually after the
object has been materialized through serialization.
getList
public java.util.Vector getList(gov.nist.nlpir.irf.handle.braf.FeatureListBrafHandle handle)
- Parameters:
start
- offset in poolFile file when list starts.- Returns:
- vector of accessible objects
put
public void put(gov.nist.nlpir.irf.handle.braf.FeatureListBrafHandle handle,
ProxyIndexingFeature value)
- Stores an object which conforms to the ProxyIndexingFeature class.
- Returns:
- new offset to beginning of list
shutdown
public void shutdown()
- Needs to be called before the class disappears, otherwise the file will
be corrupted. As this class registered with the InfoServer thanks to the
registerForShutdown()
method, this InfoServer will invoke
the current method when it receives itself a shutdown signal, so none
has to call it if the InfoServer mechanism is used.