K
- The keyV
- The stored valuepublic abstract class AbstractTable<K,V> extends Object implements Table<K,V>
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowsDuplicates
whether or not this table allows for duplicates
|
protected AtomicInteger |
commitNumber
A counter used to differ the commit on disk after N operations
|
protected long |
count
the current count of Tuples in this Table
|
protected Comparator<K> |
keyComparator
a key comparator for the keys in this Table
|
protected String |
name
the name of this table
|
protected org.apache.directory.api.ldap.model.schema.SchemaManager |
schemaManager
The global SchemaManager
|
protected Comparator<V> |
valueComparator
a value comparator for the values in this Table
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String name,
Comparator<K> keyComparator,
Comparator<V> valueComparator)
Create an instance of Table
|
Modifier and Type | Method and Description |
---|---|
long |
count(PartitionTxn transaction)
Gets the count of the number of Tuples in this Table.
|
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(PartitionTxn transaction,
K key)
Gets the number of records greater than or equal to a key value.
|
boolean |
isDupsEnabled()
Checks to see if this Table has allows for duplicate keys (a.k.a.
|
long |
lessThanCount(PartitionTxn transaction,
K key)
Gets the number of records less than or equal to a key value.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, count, cursor, cursor, get, has, has, hasGreaterOrEqual, hasGreaterOrEqual, hasLessOrEqual, hasLessOrEqual, put, remove, remove, valueCursor
protected org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
protected final Comparator<K> keyComparator
protected final Comparator<V> valueComparator
protected long count
protected boolean allowsDuplicates
protected AtomicInteger commitNumber
protected AbstractTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, String name, Comparator<K> keyComparator, Comparator<V> valueComparator)
schemaManager
- The server schemaManagername
- the name of the tablekeyComparator
- a key comparatorvalueComparator
- a value comparatorpublic Comparator<K> getKeyComparator()
getKeyComparator
in interface Table<K,V>
public Comparator<V> getValueComparator()
getValueComparator
in interface Table<K,V>
public long count(PartitionTxn transaction) throws org.apache.directory.api.ldap.model.exception.LdapException
public long greaterThanCount(PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
greaterThanCount
in interface Table<K,V>
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 dbpublic long lessThanCount(PartitionTxn transaction, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
lessThanCount
in interface Table<K,V>
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 dbpublic boolean isDupsEnabled()
isDupsEnabled
in interface Table<K,V>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.