java.lang.Object
org.apache.derby.iapi.store.access.DiskHashtable
- public class DiskHashtable
- extends java.lang.Object
This class is used by BackingStoreHashtable when the BackingStoreHashtable must spill to disk.
It implements the methods of a hash table: put, get, remove, elements, however it is not implemented
as a hash table. In order to minimize the amount of unique code it is implemented using a Btree and a heap
conglomerate. The Btree indexes the hash code of the row key. The actual key may be too long for
our Btree implementation.
Created: Fri Jan 28 13:58:03 2005
- Version:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rowConglomerateId
private final long rowConglomerateId
rowConglomerate
private ConglomerateController rowConglomerate
btreeConglomerateId
private final long btreeConglomerateId
btreeConglomerate
private ConglomerateController btreeConglomerate
btreeRow
private final org.apache.derby.iapi.types.DataValueDescriptor[] btreeRow
key_column_numbers
private final int[] key_column_numbers
remove_duplicates
private final boolean remove_duplicates
tc
private final TransactionController tc
row
private final org.apache.derby.iapi.types.DataValueDescriptor[] row
scanKey
private final org.apache.derby.iapi.types.DataValueDescriptor[] scanKey
size
private int size
keepStatistics
private boolean keepStatistics
DiskHashtable
public DiskHashtable(TransactionController tc,
org.apache.derby.iapi.types.DataValueDescriptor[] template,
int[] key_column_numbers,
boolean remove_duplicates,
boolean keepAfterCommit)
throws org.apache.derby.iapi.error.StandardException
- Creates a new
DiskHashtable instance.
close
public void close()
throws org.apache.derby.iapi.error.StandardException
put
public boolean put(java.lang.Object key,
java.lang.Object[] row)
throws org.apache.derby.iapi.error.StandardException
- Put a new row in the overflow structure.
get
public java.lang.Object get(java.lang.Object key)
throws org.apache.derby.iapi.error.StandardException
- Get a row from the overflow structure.
getRemove
private java.lang.Object getRemove(java.lang.Object key,
boolean remove,
boolean existenceOnly)
throws org.apache.derby.iapi.error.StandardException
rowMatches
private boolean rowMatches(org.apache.derby.iapi.types.DataValueDescriptor[] row,
java.lang.Object key)
remove
public java.lang.Object remove(java.lang.Object key)
throws org.apache.derby.iapi.error.StandardException
- remove all rows with a given key from the hash table.
size
public int size()
elements
public java.util.Enumeration elements()
throws org.apache.derby.iapi.error.StandardException
- Return an Enumeration that can be used to scan entire table.
RESOLVE - is it worth it to support this routine?