|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Table<K,V>
A wrapper interface around BTree implementations used to abstract away implementation details.
| Method Summary | |
|---|---|
void |
close()
Closes the underlying Db of this Table. |
int |
count()
Gets the count of the number of records in this Table. |
int |
count(K key)
Gets the count of the number of records in this Table with a specific key: returns the number of duplicates for a key. |
org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K,V>> |
cursor()
Creates a Cursor that traverses Tuples in a Table. |
org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K,V>> |
cursor(K key)
Creates a Cursor that traverses Table Tuples for the same key. |
V |
get(K key)
Gets the value of a record by key if the key exists. |
Comparator<K> |
getKeyComparator()
Gets the key comparator used by this Table: may be null if this Table was not initialized with one. |
String |
getName()
Gets the name of this Table. |
Comparator<V> |
getValueComparator()
Gets the value comparator used by this Table: may be null if this Table was not initialized with one. |
int |
greaterThanCount(K key)
Gets the number of records greater than or equal to a key value. |
boolean |
has(K key)
Checks to see if this table has one or more tuples with a specific key: this is exactly the same as a get call with a check to see if the returned value is null or not. |
boolean |
has(K key,
V value)
Checks to see if this table has a key with a specific value. |
boolean |
hasGreaterOrEqual(K key)
Checks to see if this table has a record with a key greater than or equal to the key argument. |
boolean |
hasGreaterOrEqual(K key,
V val)
Checks to see if this table has a Tuple with a key equal to the key argument, yet with a value greater than or equal to the value argument provided. |
boolean |
hasLessOrEqual(K key)
Checks to see if this table has a record with a key less than or equal to the key argument. |
boolean |
hasLessOrEqual(K key,
V val)
Checks to see if this table has a Tuple with a key equal to the key argument, yet with a value less than or equal to the value argument provided. |
boolean |
isDupsEnabled()
Checks to see if this Table has allows for duplicate keys (a.k.a. |
int |
lessThanCount(K key)
Gets the number of records less than or equal to a key value. |
void |
put(K key,
V value)
Puts a record into this Table. |
void |
remove(K key)
Removes all records with a specified key from this Table. |
void |
remove(K key,
V value)
Removes a single key value pair with a specified key and value from this Table. |
org.apache.directory.shared.ldap.model.cursor.Cursor<V> |
valueCursor(K key)
Creates a Cursor that traverses Table values for the same key. |
| Method Detail |
|---|
Comparator<K> getKeyComparator()
Comparator<V> getValueComparator()
String getName()
boolean isDupsEnabled()
boolean has(K key)
throws Exception
key - the Object of the key to check for
Exception - if there is a failure to read the underlying Db
boolean has(K key,
V value)
throws Exception
key - the key to check forvalue - the value to check for
Exception - if there is a failure to read the underlying Db
boolean hasGreaterOrEqual(K key)
throws Exception
key - the key to compare keys to
Exception - if there is a failure to read the underlying Db
boolean hasLessOrEqual(K key)
throws Exception
key - the key to compare keys to
Exception - if there is a failure to read the underlying Db
boolean hasGreaterOrEqual(K key,
V val)
throws Exception
key - the keyval - the value to compare values to
Exception - if there is a failure to read the underlying Db
or if the underlying Db is not of the Btree type that allows sorted
duplicate values.
boolean hasLessOrEqual(K key,
V val)
throws Exception
key - the keyval - the value to compare values to
Exception - if there is a failure to read the underlying Db
or if the underlying Db is not of the Btree type that allows sorted
duplicate values.
V get(K key)
throws Exception
key - the key of the record
Exception - if there is a failure to read the underlying Db
void put(K key,
V value)
throws Exception
key - the key of the recordvalue - the value of the record.
Exception - if there is a failure to read or write to the
underlying Db
IllegalArgumentException - if a null key or value is used
void remove(K key)
throws Exception
key - the key of the records to remove
Exception - if there is a failure to read or write to
the underlying Db
void remove(K key,
V value)
throws Exception
key - the key of the record to removevalue - the value of the record to remove
Exception - if there is a failure to read or write to
the underlying Db
org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K,V>> cursor()
throws Exception
Exception - if there are failures accessing underlying stores
org.apache.directory.shared.ldap.model.cursor.Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K,V>> cursor(K key)
throws Exception
key - the duplicate key to return the Tuples of
Exception - if there are failures accessing underlying stores
org.apache.directory.shared.ldap.model.cursor.Cursor<V> valueCursor(K key)
throws Exception
key - the duplicate key to return the values of
Exception - if there are failures accessing underlying stores
int count()
throws Exception
Exception - if there is a failure to read the underlying Db
int count(K key)
throws Exception
key - the Object key to count.
Exception - if there is a failure to read the underlying Db
int greaterThanCount(K key)
throws Exception
key - the key to use in comparisons
Exception - if there is a failure to read the underlying db
int lessThanCount(K key)
throws Exception
key - the key to use in comparisons
Exception - if there is a failure to read the underlying db
void close()
throws Exception
Exception - on any failures
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||