|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.ganymede.DBObjectTable
A customized variant of the java.util.Hashtable class that is
tuned for use in managing DBObjects
in a Ganymede DBObjectBase.
| Field Summary | |
private java.util.Vector[] |
backPointerTable
A collection of Vectors, one for each object in the database. |
private int |
count
The total number of entries in the hash table. |
private float |
loadFactor
The load factor for the hashtable. |
private DBObject[] |
table
The hash table data. |
private int |
threshold
Rehashes the table when count exceeds this threshold. |
| Constructor Summary | |
DBObjectTable()
Constructs a new, empty DBObjectTable with a default capacity and load factor. |
|
DBObjectTable(int initialCapacity)
Constructs a new, empty DBObjectTable with the specified initial capacity and default load factor. |
|
DBObjectTable(int initialCapacity,
float loadFactor)
Constructs a new, empty DBObjectTable with the specified initial capacity and the specified load factor. |
|
| Method Summary | |
void |
clear()
Clears this DBObjectTable. |
boolean |
contains(DBObject value)
Tests if the DBObject value is contained in this DBObjectTable. |
boolean |
containsKey(int key)
Tests if a DBObject with the specified object id is in this DBObjectTable. |
java.util.Enumeration |
elements()
Returns an enumeration of the objects in this DBObjectTable. |
DBObject |
get(int key)
Returns the DBObject with the specified key from this DBObjectTable, or null if no object with that id is in this table. |
DBObject |
getNoSync(int key)
Returns the DBObject with the specified key from this DBObjectTable, or null if no object with that id is in this table. |
boolean |
isEmpty()
Tests if this DBObjectTable contains no objects. |
void |
put(DBObject value)
Inserts a DBObject into this DBObjectTable |
void |
putNoSync(DBObject value)
Inserts a DBObject into this DBObjectTable. |
void |
putNoSyncNoRemove(DBObject value)
Inserts a DBObject into this DBObjectTable. |
protected void |
rehash()
Rehashes the contents of the DBObjectTable into a DBObjectTable with a larger capacity. |
void |
remove(int key)
Removes the DBObject with the given id from this DBObjectTable. |
void |
removeNoSync(int key)
Removes the DBObject with the given id from this DBObjectTable. |
int |
size()
Returns the number of objects in this DBObjectTable. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private transient DBObject[] table
private transient java.util.Vector[] backPointerTable
private transient int count
private int threshold
private float loadFactor
| Constructor Detail |
public DBObjectTable(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the hashtable.loadFactor - a number between 0.0 and 1.0.java.lang.IllegalArgumentException - if the initial capacity is less
than or equal to zero, or if the load factor is less than
or equal to zero.public DBObjectTable(int initialCapacity)
initialCapacity - the initial capacity of the hashtable.public DBObjectTable()
| Method Detail |
public int size()
public boolean isEmpty()
true if this DBObjectTable contains no values;
false otherwise.public java.util.Enumeration elements()
Enumerationpublic boolean contains(DBObject value)
value - a DBObject to search for.NullPointerException - if the value is null.public boolean containsKey(int key)
key - possible object id.public DBObject getNoSync(int key)
public DBObject get(int key)
protected void rehash()
public void putNoSync(DBObject value)
public void put(DBObject value)
public void putNoSyncNoRemove(DBObject value)
public void removeNoSync(int key)
public void remove(int key)
public void clear()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||