|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdbm.htree.HTree<K,V>
public class HTree<K,V>
Persistent hashtable implementation for PageManager. Implemented as an H*Tree structure. WARNING! If this instance is used in a transactional context, it *must* be discarded after a rollback.
Method Summary | ||
---|---|---|
void |
addRecordListener(RecordListener<K,V> listener)
add RecordListener which is notified about record changes |
|
HTreeMap<K,V> |
asMap()
|
|
static
|
createInstance(RecordManager recman)
Create a persistent hashtable. |
|
static
|
createInstance(RecordManager recman,
Serializer<K> keySerializer,
Serializer<V> valueSerializer)
Create a persistent hashtable. |
|
V |
find(K key)
Returns the value which is associated with the given key. |
|
Serializer<K> |
getKeySerializer()
|
|
long |
getRecid()
Get the record identifier used to load this hashtable. |
|
RecordManager |
getRecordManager()
|
|
Serializer<V> |
getValueSerializer()
|
|
java.util.Iterator<K> |
keys()
Returns an enumeration of the keys contained in this |
|
static
|
load(RecordManager recman,
long root_recid)
Load a persistent hashtable |
|
static
|
load(RecordManager recman,
long root_recid,
Serializer<K> keySerializer,
Serializer<V> valueSerializer)
Load a persistent hashtable |
|
void |
put(K key,
V value)
Associates the specified value with the specified key. |
|
void |
remove(K key)
Remove the value which is associated with the given key. |
|
void |
removeRecordListener(RecordListener<K,V> listener)
remove RecordListener which is notified about record changes |
|
java.util.Iterator<V> |
values()
Returns an enumeration of the values contained in this |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Serializer<K> getKeySerializer()
public Serializer<V> getValueSerializer()
public static <K,V> HTree<K,V> createInstance(RecordManager recman) throws java.io.IOException
recman
- Record manager used for persistence.
java.io.IOException
public static <K,V> HTree<K,V> createInstance(RecordManager recman, Serializer<K> keySerializer, Serializer<V> valueSerializer) throws java.io.IOException
recman
- Record manager used for persistence.
java.io.IOException
public static <K,V> HTree<K,V> load(RecordManager recman, long root_recid) throws java.io.IOException
recman
- RecordManager used to store the persistent hashtableroot_recid
- Record id of the root directory of the HTree
java.io.IOException
public static <K,V> HTree<K,V> load(RecordManager recman, long root_recid, Serializer<K> keySerializer, Serializer<V> valueSerializer) throws java.io.IOException
recman
- RecordManager used to store the persistent hashtableroot_recid
- Record id of the root directory of the HTree
java.io.IOException
public void put(K key, V value) throws java.io.IOException
key
- key with which the specified value is to be assocated.value
- value to be associated with the specified key.
java.io.IOException
public V find(K key) throws java.io.IOException
null
if there is not association for this key.
find
in interface JdbmBase<K,V>
key
- key whose associated value is to be returned
java.io.IOException
public void remove(K key) throws java.io.IOException
key
- key whose associated value is to be removed
java.io.IOException
public java.util.Iterator<K> keys() throws java.io.IOException
java.io.IOException
public java.util.Iterator<V> values() throws java.io.IOException
java.io.IOException
public long getRecid()
public HTreeMap<K,V> asMap()
public void addRecordListener(RecordListener<K,V> listener)
addRecordListener
in interface JdbmBase<K,V>
listener
- public void removeRecordListener(RecordListener<K,V> listener)
removeRecordListener
in interface JdbmBase<K,V>
listener
- public RecordManager getRecordManager()
getRecordManager
in interface JdbmBase<K,V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |