org.apache.directory.server.core.partition.impl.btree
Interface Index


public interface Index

Required interfaces for an index.

Version:
$Rev: 517022 $
Author:
Apache Directory Project

Method Summary
 void add(javax.naming.directory.Attribute attr, java.lang.Object id)
           
 void add(javax.naming.directory.Attributes attrs, java.lang.Object id)
           
 void add(java.lang.Object attrVal, java.lang.Object id)
           
 void close()
           
 int count()
          Gets the total scan count for this index.
 int count(java.lang.Object attrVal)
          Gets the scan count for the occurance of a specific attribute value within the index.
 int count(java.lang.Object attrVal, boolean isGreaterThan)
           
 void drop(javax.naming.directory.Attribute attr, java.lang.Object id)
          If the Attribute does not have any values then this reduces to a drop(BigInteger) call.
 void drop(javax.naming.directory.Attributes attrs, java.lang.Object id)
          If the Attribute for this index within the Attributes does not have any values then this reduces to a drop(BigInteger) call.
 void drop(java.lang.Object entryId)
           
 void drop(java.lang.Object attrVal, java.lang.Object id)
           
 java.lang.Object forwardLookup(java.lang.Object attrVal)
           
 org.apache.directory.shared.ldap.schema.AttributeType getAttribute()
          Gets the attribute this Index is built upon.
 java.lang.Object getNormalized(java.lang.Object attrVal)
          Gets the normalized value for an attribute.
 boolean hasValue(java.lang.Object attrVal, java.lang.Object id)
           
 boolean hasValue(java.lang.Object attrVal, java.lang.Object id, boolean isGreaterThan)
           
 boolean hasValue(java.util.regex.Pattern regex, java.lang.Object id)
           
 IndexEnumeration listIndices()
           
 IndexEnumeration listIndices(java.lang.Object attrVal)
           
 IndexEnumeration listIndices(java.lang.Object attrVal, boolean isGreaterThan)
           
 IndexEnumeration listIndices(java.util.regex.Pattern regex)
           
 IndexEnumeration listIndices(java.util.regex.Pattern regex, java.lang.String prefix)
           
 IndexEnumeration listReverseIndices(java.lang.Object id)
           
 java.lang.Object reverseLookup(java.lang.Object id)
           
 void sync()
           
 

Method Detail

getAttribute

org.apache.directory.shared.ldap.schema.AttributeType getAttribute()
Gets the attribute this Index is built upon.

Returns:
the id of the Index's attribute

getNormalized

java.lang.Object getNormalized(java.lang.Object attrVal)
                               throws javax.naming.NamingException
Gets the normalized value for an attribute.

Parameters:
attrVal - the user provided value to normalize
Returns:
the normalized value.
Throws:
javax.naming.NamingException - if something goes wrong.

count

int count()
          throws javax.naming.NamingException
Gets the total scan count for this index.

Returns:
the number of key/value pairs in this index
Throws:
javax.naming.NamingException - if their is a failure accessing the index

count

int count(java.lang.Object attrVal)
          throws javax.naming.NamingException
Gets the scan count for the occurance of a specific attribute value within the index.

Parameters:
attrVal - the value of the attribute to get a scan count for
Returns:
the number of key/value pairs in this index with the value value
Throws:
javax.naming.NamingException - if their is a failure accessing the index

count

int count(java.lang.Object attrVal,
          boolean isGreaterThan)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

forwardLookup

java.lang.Object forwardLookup(java.lang.Object attrVal)
                               throws javax.naming.NamingException
Throws:
javax.naming.NamingException

reverseLookup

java.lang.Object reverseLookup(java.lang.Object id)
                               throws javax.naming.NamingException
Throws:
javax.naming.NamingException

add

void add(java.lang.Object attrVal,
         java.lang.Object id)
         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

add

void add(javax.naming.directory.Attribute attr,
         java.lang.Object id)
         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

add

void add(javax.naming.directory.Attributes attrs,
         java.lang.Object id)
         throws javax.naming.NamingException
Throws:
javax.naming.NamingException

drop

void drop(java.lang.Object entryId)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

drop

void drop(java.lang.Object attrVal,
          java.lang.Object id)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

drop

void drop(javax.naming.directory.Attribute attr,
          java.lang.Object id)
          throws javax.naming.NamingException
If the Attribute does not have any values then this reduces to a drop(BigInteger) call.

Throws:
javax.naming.NamingException

drop

void drop(javax.naming.directory.Attributes attrs,
          java.lang.Object id)
          throws javax.naming.NamingException
If the Attribute for this index within the Attributes does not have any values then this reduces to a drop(BigInteger) call.

Throws:
javax.naming.NamingException

listReverseIndices

IndexEnumeration listReverseIndices(java.lang.Object id)
                                    throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listIndices

IndexEnumeration listIndices()
                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listIndices

IndexEnumeration listIndices(java.lang.Object attrVal)
                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listIndices

IndexEnumeration listIndices(java.lang.Object attrVal,
                             boolean isGreaterThan)
                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listIndices

IndexEnumeration listIndices(java.util.regex.Pattern regex)
                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

listIndices

IndexEnumeration listIndices(java.util.regex.Pattern regex,
                             java.lang.String prefix)
                             throws javax.naming.NamingException
Throws:
javax.naming.NamingException

hasValue

boolean hasValue(java.lang.Object attrVal,
                 java.lang.Object id)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

hasValue

boolean hasValue(java.lang.Object attrVal,
                 java.lang.Object id,
                 boolean isGreaterThan)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

hasValue

boolean hasValue(java.util.regex.Pattern regex,
                 java.lang.Object id)
                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

close

void close()
           throws javax.naming.NamingException
Throws:
javax.naming.NamingException

sync

void sync()
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException


Copyright © 2003-2007 The Apache Software Foundation. All Rights Reserved.