public interface Table<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.directory.server.core.api.partition.PartitionTxn transaction)
Closes the underlying Db of this Table.
|
long |
count(org.apache.directory.server.core.api.partition.PartitionTxn transaction)
Gets the count of the number of Tuples in this Table.
|
long |
count(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
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.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> |
cursor()
Creates a Cursor that traverses Tuples in a Table.
|
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> |
cursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K key)
Creates a Cursor that traverses Table Tuples for the same key.
|
V |
get(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
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.
|
long |
greaterThanCount(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key)
Gets the number of records greater than or equal to a key value.
|
boolean |
has(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
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(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key,
V value)
Checks to see if this table has a key with a specific value.
|
boolean |
hasGreaterOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key)
Checks to see if this table has a record with a key greater than or
equal to the key argument.
|
boolean |
hasGreaterOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
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(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key)
Checks to see if this table has a record with a key less than or
equal to the key argument.
|
boolean |
hasLessOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
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.
|
long |
lessThanCount(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key)
Gets the number of records less than or equal to a key value.
|
void |
put(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction,
K key,
V value)
Puts a record into this Table.
|
void |
remove(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction,
K key)
Removes all records with a specified key from this Table.
|
void |
remove(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction,
K key,
V value)
Removes a single key value pair with a specified key and value from
this Table.
|
org.apache.directory.api.ldap.model.cursor.Cursor<V> |
valueCursor(org.apache.directory.server.core.api.partition.PartitionTxn transaction,
K key)
Creates a Cursor that traverses Table values for the same key.
|
Comparator<K> getKeyComparator()
Comparator<V> getValueComparator()
boolean isDupsEnabled()
boolean has(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the Object of the key to check fororg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dbboolean has(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key to check forvalue - the value to check fororg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dbboolean hasGreaterOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key to compare keys toorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dbboolean hasLessOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key to compare keys toorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dbboolean hasGreaterOrEqual(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key, V val) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the keyval - the value to compare values toorg.apache.directory.api.ldap.model.exception.LdapException - 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(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key, V val) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the keyval - the value to compare values toorg.apache.directory.api.ldap.model.exception.LdapException - 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(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key of the recordorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dbvoid put(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction, K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException
writeTransaction - The transaction we are running inkey - the key of the recordvalue - the value of the record.org.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read or write to the
underlying DbIllegalArgumentException - if a null key or value is usedvoid remove(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
writeTransaction - The transaction we are running inkey - the key of the records to removeorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read or write to
the underlying Dbvoid remove(org.apache.directory.server.core.api.partition.PartitionTxn writeTransaction, K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException
writeTransaction - The transaction we are running inkey - the key of the record to removevalue - the value of the record to removeorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read or write to
the underlying Dborg.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> cursor()
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> cursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
partitionTxn - The transaction we are running inkey - the duplicate key to return the Tuples oforg.apache.directory.api.ldap.model.exception.LdapException - if there are failures accessing underlying storesorg.apache.directory.api.ldap.model.cursor.Cursor<V> valueCursor(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the duplicate key to return the values oforg.apache.directory.api.ldap.model.exception.LdapException - if there are failures accessing underlying storeslong count(org.apache.directory.server.core.api.partition.PartitionTxn transaction) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dblong count(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the Object key to count.org.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying Dblong greaterThanCount(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key to use in comparisonsorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying dblong lessThanCount(org.apache.directory.server.core.api.partition.PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inkey - the key to use in comparisonsorg.apache.directory.api.ldap.model.exception.LdapException - if there is a failure to read the underlying dbvoid close(org.apache.directory.server.core.api.partition.PartitionTxn transaction) throws org.apache.directory.api.ldap.model.exception.LdapException
transaction - The transaction we are running inorg.apache.directory.api.ldap.model.exception.LdapException - on any failuresCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.