|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.core.foundation.PersistentObject
org.exolab.core.database.recman.PMDHashMap
This is an implementation of the HashMapIfc specific to the page managed database where references to objects are managed as PMDHandle instances rather than the objects themselves. This is necessary to optimise the concurrency and performance of the database.
In addition this class deals with PersistentObjects rather than just Object instance, since it assumes you are using this clas in a persistence context. Therefore some method, that take an Object may throw a runtime exception if the objects are not of this type.
Finally, an instance of this class is created within the context of a session and within a valid transaction....which I don't have a plan for
Instrument for better serialization by overriding the writeObject and readObject methods in a later version
| Constructor Summary | |
PMDHashMap()
|
|
| Method Summary | |
void |
clear()
Clear the map |
boolean |
containsKey(java.lang.Object key)
Return true if the specified key maps to an element in the map |
boolean |
containsValue(PersistentCapableIfc element)
Test to see whether the map contains the specified value |
java.util.Enumeration |
elements()
Return an enumeration of all the elements in the map |
PersistentCapableIfc |
get(java.lang.Object key)
Return the object mapped to this key. |
java.lang.Object |
getMapObject()
Return a refernece to the enclosed map. |
boolean |
isEmpty()
Test for an empty hashmap |
java.util.Enumeration |
keys()
Return the enumeration of all keys in the map |
PersistentCapableIfc |
put(java.lang.Object key,
PersistentCapableIfc element)
Add the key and associated element to the map and return a reference to the object. |
void |
readExternal(java.io.ObjectInput stream)
|
PersistentCapableIfc |
remove(java.lang.Object key)
Remove the object mapped to the specified key from the map and return it to the client |
int |
size()
Return the size of the map |
void |
writeExternal(java.io.ObjectOutput stream)
|
| Methods inherited from class org.exolab.core.foundation.PersistentObject |
clone, equals, getId, getMinimumObjectSize, getObjectId, getObjectVersion, getVersion, setId, setMinimumObjectSize, setObjectId, setObjectVersion, setVersion |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exolab.core.foundation.PersistentCapableIfc |
getMinimumObjectSize, getObjectId, getObjectVersion, setMinimumObjectSize |
| Constructor Detail |
public PMDHashMap()
| Method Detail |
public int size()
size in interface HashMapIfcpublic boolean isEmpty()
isEmpty in interface HashMapIfcpublic java.util.Enumeration keys()
keys in interface HashMapIfcpublic java.util.Enumeration elements()
elements in interface HashMapIfcpublic boolean containsValue(PersistentCapableIfc element)
containsValue in interface HashMapIfcelement - element to test against
public boolean containsKey(java.lang.Object key)
containsKey in interface HashMapIfckey - key to test against
public PersistentCapableIfc get(java.lang.Object key)
get in interface HashMapIfckey - key to lookup
public PersistentCapableIfc put(java.lang.Object key,
PersistentCapableIfc element)
put in interface HashMapIfckey - key to mapelement - corresponding element
public PersistentCapableIfc remove(java.lang.Object key)
remove in interface HashMapIfckey - key to removepublic void clear()
clear in interface HashMapIfcpublic java.lang.Object getMapObject()
getMapObject in interface HashMapIfc
public void writeExternal(java.io.ObjectOutput stream)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class PersistentObjectjava.io.IOException
public void readExternal(java.io.ObjectInput stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class PersistentObjectjava.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||