Package db
Class DBFieldMap
- java.lang.Object
-
- db.DBFieldMap
-
public class DBFieldMap extends java.lang.Object
DBFieldMap
provides a database-backed map of non-unique Field values to long values.
-
-
Constructor Summary
Constructors Constructor Description DBFieldMap(java.lang.Class<? extends Field> fieldClass, int cacheSizeMB)
Construct a new map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(Field fieldValue, long longValue)
Add the specified value pair to this map.boolean
deleteEntry(Field fieldValue, long longValue)
Delete the specified value pair from this map.void
dispose()
Dispose all resources associated with this map.protected void
finalize()
LongIterator
iterator()
-
-
-
Constructor Detail
-
DBFieldMap
public DBFieldMap(java.lang.Class<? extends Field> fieldClass, int cacheSizeMB)
Construct a new map. A temporary database is used to provide storage for the map.- Parameters:
fieldClass
- specifies class of Field values to be stored in this map.cacheSizeMB
- size of data cache in MBytes.
-
-
Method Detail
-
dispose
public void dispose()
Dispose all resources associated with this map. This method should be invoked when the map is no longer needed.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
addEntry
public void addEntry(Field fieldValue, long longValue)
Add the specified value pair to this map. If the entry already exists, this method has no affect.- Parameters:
fieldValue
-longValue
-
-
deleteEntry
public boolean deleteEntry(Field fieldValue, long longValue)
Delete the specified value pair from this map.- Parameters:
fieldValue
-longValue
-- Returns:
- true if entry exists and was deleted
-
iterator
public LongIterator iterator()
-
-