public class DiskHashtable
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
private class |
DiskHashtable.ElementEnum |
Modifier and Type | Field | Description |
---|---|---|
private ConglomerateController |
btreeConglomerate |
|
private long |
btreeConglomerateId |
|
private DataValueDescriptor[] |
btreeRow |
|
private boolean |
keepAfterCommit |
|
private boolean |
keepStatistics |
|
private int[] |
key_column_numbers |
|
private boolean |
remove_duplicates |
|
private DataValueDescriptor[] |
row |
|
private ConglomerateController |
rowConglomerate |
|
private long |
rowConglomerateId |
|
private DataValueDescriptor[] |
scanKey |
|
private int |
size |
|
private TransactionController |
tc |
Constructor | Description |
---|---|
DiskHashtable(TransactionController tc,
DataValueDescriptor[] template,
int[] collation_ids,
int[] key_column_numbers,
boolean remove_duplicates,
boolean keepAfterCommit) |
Creates a new
DiskHashtable instance. |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
java.util.Enumeration<java.lang.Object> |
elements() |
Return an Enumeration that can be used to scan entire table.
|
java.lang.Object |
get(java.lang.Object key) |
Get a row from the overflow structure.
|
private static Context |
getContextOrNull(java.lang.String contextID) |
Privileged lookup of a Context.
|
private java.lang.Object |
getRemove(java.lang.Object key,
boolean remove,
boolean existenceOnly) |
|
boolean |
put(java.lang.Object key,
java.lang.Object[] row) |
Put a new row in the overflow structure.
|
java.lang.Object |
remove(java.lang.Object key) |
remove all rows with a given key from the hash table.
|
private boolean |
rowMatches(DataValueDescriptor[] row,
java.lang.Object key) |
|
int |
size() |
private final long rowConglomerateId
private ConglomerateController rowConglomerate
private final long btreeConglomerateId
private ConglomerateController btreeConglomerate
private final DataValueDescriptor[] btreeRow
private final int[] key_column_numbers
private final boolean remove_duplicates
private final TransactionController tc
private final DataValueDescriptor[] row
private final DataValueDescriptor[] scanKey
private int size
private boolean keepStatistics
private final boolean keepAfterCommit
public DiskHashtable(TransactionController tc, DataValueDescriptor[] template, int[] collation_ids, int[] key_column_numbers, boolean remove_duplicates, boolean keepAfterCommit) throws StandardException
DiskHashtable
instance.tc
- template
- An array of DataValueDescriptors that
serves as a template for the rows.key_column_numbers
- The indexes of the key columns (0 based)remove_duplicates
- If true then rows with duplicate keys are
removed.keepAfterCommit
- If true then the hash table is kept after
a commitStandardException
public void close() throws StandardException
StandardException
public boolean put(java.lang.Object key, java.lang.Object[] row) throws StandardException
row
- The row to be inserted.StandardException
- standard error policypublic java.lang.Object get(java.lang.Object key) throws StandardException
key
- If the rows only have one key column then the key value.
If there is more than one key column then a KeyHasherStandardException
private java.lang.Object getRemove(java.lang.Object key, boolean remove, boolean existenceOnly) throws StandardException
StandardException
private boolean rowMatches(DataValueDescriptor[] row, java.lang.Object key)
public java.lang.Object remove(java.lang.Object key) throws StandardException
key
- The key of the rows to remove.StandardException
- Standard exception policy.public int size()
public java.util.Enumeration<java.lang.Object> elements() throws StandardException
RESOLVE - is it worth it to support this routine?
StandardException
- Standard exception policy.private static Context getContextOrNull(java.lang.String contextID)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.