public class JdbmIndex<K> extends org.apache.directory.server.xdbm.AbstractIndex<K,String>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_DUPLICATE_LIMIT
default duplicate limit before duplicate keys switch to using a btree for values
|
protected JdbmTable<K,String> |
forward
the forward btree where the btree key is the value of the indexed attribute and
the value of the btree is the entry id of the entry containing an attribute with
that value
|
static String |
FORWARD_BTREE
the key used for the forward btree name
|
protected int |
numDupLimit
duplicate limit before duplicate keys switch to using a btree for values
|
protected jdbm.RecordManager |
recMan
the JDBM record manager for the file containing this index
|
protected JdbmTable<String,K> |
reverse
the reverse btree where the btree key is the entry id of the entry containing a
value for the indexed attribute, and the btree value is the value of the indexed
attribute
|
static String |
REVERSE_BTREE
the key used for the reverse btree name
|
protected File |
wkDirPath
a custom working directory path when specified in configuration
|
| Constructor and Description |
|---|
JdbmIndex(String attributeId,
boolean withReverse)
Creates a JdbmIndex instance for a give AttributeId
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal,
String id) |
void |
close(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) |
long |
count(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) |
long |
count(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal) |
void |
drop(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal,
String id) |
void |
drop(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
String entryId) |
boolean |
forward(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal) |
boolean |
forward(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal,
String id) |
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.server.xdbm.IndexEntry<K,String>> |
forwardCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) |
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.server.xdbm.IndexEntry<K,String>> |
forwardCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K key) |
String |
forwardLookup(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal) |
org.apache.directory.api.ldap.model.cursor.Cursor<String> |
forwardValueCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K key) |
int |
getNumDupLimit()
Gets the threshold at which point duplicate keys use btree indirection to store
their values.
|
URI |
getWkDirPath()
Gets the working directory path to something other than the default.
|
long |
greaterThanCount(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal) |
void |
init(jdbm.RecordManager recMan,
org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager,
org.apache.directory.api.ldap.model.schema.AttributeType attributeType)
Initialize the index for an Attribute, with a specific working directory (may be null).
|
boolean |
isDupsEnabled() |
long |
lessThanCount(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
K attrVal) |
boolean |
reverse(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
String id) |
boolean |
reverse(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
String id,
K attrVal) |
K |
reverseLookup(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
String id) |
org.apache.directory.api.ldap.model.cursor.Cursor<K> |
reverseValueCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn,
String id) |
void |
setNumDupLimit(int numDupLimit)
Sets the threshold at which point duplicate keys use btree indirection to store
their values.
|
void |
setWkDirPath(URI wkDirPath)
Sets the working directory path to something other than the default.
|
String |
toString() |
public static final int DEFAULT_DUPLICATE_LIMIT
public static final String FORWARD_BTREE
public static final String REVERSE_BTREE
protected JdbmTable<K,String> forward
protected JdbmTable<String,K> reverse
protected jdbm.RecordManager recMan
protected int numDupLimit
public void init(jdbm.RecordManager recMan, org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager, org.apache.directory.api.ldap.model.schema.AttributeType attributeType) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
recMan - The RecordManagerschemaManager - The schemaManager to use to get back the AttributeattributeType - The attributeType this index is created fororg.apache.directory.api.ldap.model.exception.LdapException - If the initialization failedIOException - If the initialization failedpublic int getNumDupLimit()
public void setNumDupLimit(int numDupLimit)
numDupLimit - the threshold for storing a keys values in another btreepublic void setWkDirPath(URI wkDirPath)
wkDirPath - optional working directory pathpublic URI getWkDirPath()
public long count(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic long count(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic long greaterThanCount(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic long lessThanCount(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic String forwardLookup(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic K reverseLookup(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, String id) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void add(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal, String id) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void drop(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal, String id) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void drop(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, String entryId) 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.server.xdbm.IndexEntry<K,String>> forwardCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) 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.server.xdbm.IndexEntry<K,String>> forwardCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K key) 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<K> reverseValueCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, String id) 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<String> forwardValueCursor(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K key) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean forward(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean forward(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, K attrVal, String id) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean reverse(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, String id) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean reverse(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn, String id, K attrVal) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionpublic void close(org.apache.directory.server.core.api.partition.PartitionTxn partitionTxn) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException
org.apache.directory.api.ldap.model.exception.LdapExceptionIOExceptionpublic boolean isDupsEnabled()
public String toString()
toString in class ObjectObject.toString()Copyright © 2003–2023 The Apache Software Foundation. All rights reserved.