public class JdbmTable<K,V>
extends org.apache.directory.server.xdbm.AbstractTable<K,V>
| Constructor and Description |
|---|
JdbmTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String name,
int numDupLimit,
jdbm.RecordManager manager,
Comparator<K> keyComparator,
Comparator<V> valueComparator,
jdbm.helper.Serializer keySerializer,
jdbm.helper.Serializer valueSerializer)
Creates a Jdbm BTree based tuple Table abstraction that enables
duplicates.
|
JdbmTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String name,
jdbm.RecordManager manager,
Comparator<K> keyComparator,
jdbm.helper.Serializer keySerializer,
jdbm.helper.Serializer valueSerializer)
Creates a Jdbm BTree based tuple Table abstraction without duplicates
enabled using a simple key comparator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
count(K key) |
org.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(K key) |
V |
get(K key) |
jdbm.helper.Serializer |
getKeySerializer() |
org.apache.directory.server.core.avltree.Marshaller<org.apache.directory.server.core.avltree.ArrayTree<V>> |
getMarshaller() |
jdbm.helper.Serializer |
getValueSerializer() |
long |
greaterThanCount(K key) |
boolean |
has(K key) |
boolean |
has(K key,
V value) |
boolean |
hasGreaterOrEqual(K key) |
boolean |
hasGreaterOrEqual(K key,
V val) |
boolean |
hasLessOrEqual(K key) |
boolean |
hasLessOrEqual(K key,
V val) |
boolean |
isDupsEnabled() |
long |
lessThanCount(K key) |
void |
put(K key,
V value) |
void |
remove(K key) |
void |
remove(K key,
V value) |
void |
sync()
Synchronizes the buffers with disk.
|
org.apache.directory.api.ldap.model.cursor.Cursor<V> |
valueCursor(K key) |
public JdbmTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String name,
int numDupLimit,
jdbm.RecordManager manager,
Comparator<K> keyComparator,
Comparator<V> valueComparator,
jdbm.helper.Serializer keySerializer,
jdbm.helper.Serializer valueSerializer)
throws IOException
schemaManager - The server schemaManagername - the name of the tablenumDupLimit - the size limit of duplicates before switching to BTrees for values instead of AvlTreesmanager - the record manager to be used for this tablekeyComparator - a key comparatorvalueComparator - a value comparatorkeySerializer - a serializer to use for the keys instead of using
default Java serialization which could be very expensivevalueSerializer - a serializer to use for the values instead of
using default Java serialization which could be very expensiveIOException - if the table's file cannot be createdpublic JdbmTable(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
String name,
jdbm.RecordManager manager,
Comparator<K> keyComparator,
jdbm.helper.Serializer keySerializer,
jdbm.helper.Serializer valueSerializer)
throws IOException
schemaManager - The server schemaManagername - the name of the tablemanager - the record manager to be used for this tablekeyComparator - a tuple comparatorkeySerializer - a serializer to use for the keys instead of using
default Java serialization which could be very expensivevalueSerializer - a serializer to use for the values instead of
using default Java serialization which could be very expensiveIOException - if the table's file cannot be createdpublic jdbm.helper.Serializer getKeySerializer()
public jdbm.helper.Serializer getValueSerializer()
public boolean isDupsEnabled()
Table.isDupsEnabled()public long greaterThanCount(K key) throws IOException
IOExceptionTable#greaterThanCount(Object)public long lessThanCount(K key) throws IOException
IOExceptionTable#lessThanCount(Object)public long count(K key) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionTable.count(java.lang.Object)public V get(K key) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean hasGreaterOrEqual(K key, V val) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionTable#hasGreaterOrEqual(Object,Object)public boolean hasLessOrEqual(K key, V val) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionTable#hasLessOrEqual(Object,Object)public boolean hasGreaterOrEqual(K key) throws IOException
IOExceptionTable.hasGreaterOrEqual(Object)public boolean hasLessOrEqual(K key) throws IOException
IOExceptionTable#hasLessOrEqual(Object)public boolean has(K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionTable.has(java.lang.Object,
java.lang.Object)public boolean has(K key) throws IOException
IOExceptionTable#has(java.lang.Object)public void put(K key, V value) throws Exception
ExceptionTable.put(java.lang.Object,
java.lang.Object)public void remove(K key, V value) throws IOException
IOExceptionTable.remove(java.lang.Object,
java.lang.Object)public void remove(K key)
Table#remove(Object)public org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> cursor() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>> cursor(K key) throws Exception
Exceptionpublic org.apache.directory.api.ldap.model.cursor.Cursor<V> valueCursor(K key) throws Exception
Exceptionpublic void close()
throws IOException
IOExceptionTable#close()public void sync()
throws IOException
IOException - if errors are encountered on the flushpublic org.apache.directory.server.core.avltree.Marshaller<org.apache.directory.server.core.avltree.ArrayTree<V>> getMarshaller()
Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.