|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.util.SmallMap
public class SmallMap
A simple hash table with an optimization for the last recently used object.
| Constructor Summary | |
|---|---|
SmallMap(int maxElements)
Create a map with the given maximum number of entries. |
|
| Method Summary | |
|---|---|
int |
addObject(int id,
java.lang.Object o)
Add an object to the map. |
void |
freeObject(int id)
Remove an object from the map. |
java.lang.Object |
getObject(int id,
boolean ifAvailable)
Get an object from the map if it is stored. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SmallMap(int maxElements)
maxElements - the maximum number of entries| Method Detail |
|---|
public int addObject(int id,
java.lang.Object o)
id - the object ido - the object
public void freeObject(int id)
id - the id of the object to remove
public java.lang.Object getObject(int id,
boolean ifAvailable)
id - the id of the objectifAvailable - only return it if available, otherwise return null
DbException - if isAvailable is false and the object has not been
found
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||