|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex
public class JdbmIndex
A Jdbm based index implementation.
Field Summary | |
---|---|
static java.lang.String |
FORWARD_BTREE
|
static java.lang.String |
REVERSE_BTREE
|
Constructor Summary | |
---|---|
JdbmIndex(org.apache.directory.shared.ldap.schema.AttributeType attribute,
java.io.File wkDirPath,
int cacheSize,
int numDupLimit)
Creates an Index using an existing record manager based on a file. |
Method Summary | |
---|---|
void |
add(javax.naming.directory.Attribute attr,
java.math.BigInteger id)
|
void |
add(javax.naming.directory.Attributes attrs,
java.math.BigInteger id)
|
void |
add(java.lang.Object attrVal,
java.math.BigInteger 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.math.BigInteger 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.math.BigInteger 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.math.BigInteger entryId)
|
void |
drop(java.lang.Object attrVal,
java.math.BigInteger id)
|
java.math.BigInteger |
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)
TODO I don't think the keyCache is required anymore since the normalizer will cache values for us. |
boolean |
hasValue(java.lang.Object attrVal,
java.math.BigInteger id)
|
boolean |
hasValue(java.lang.Object attrVal,
java.math.BigInteger id,
boolean isGreaterThan)
|
boolean |
hasValue(java.util.regex.Pattern regex,
java.math.BigInteger 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.math.BigInteger id)
|
java.lang.Object |
reverseLookup(java.math.BigInteger id)
|
void |
sync()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FORWARD_BTREE
public static final java.lang.String REVERSE_BTREE
Constructor Detail |
---|
public JdbmIndex(org.apache.directory.shared.ldap.schema.AttributeType attribute, java.io.File wkDirPath, int cacheSize, int numDupLimit) throws javax.naming.NamingException
attribute
- the attribute specification to base this index onrecMan
- the record manager
javax.naming.NamingException
- if we fail to create B+Trees using recManMethod Detail |
---|
public org.apache.directory.shared.ldap.schema.AttributeType getAttribute()
Index
getAttribute
in interface Index
Index.getAttribute()
public int count() throws javax.naming.NamingException
Index
count
in interface Index
javax.naming.NamingException
- if their is a failure accessing the indexIndex.count()
public int count(java.lang.Object attrVal) throws javax.naming.NamingException
Index
count
in interface Index
attrVal
- the value of the attribute to get a scan count for
javax.naming.NamingException
- if their is a failure accessing the indexIndex.count(java.lang.Object)
public int count(java.lang.Object attrVal, boolean isGreaterThan) throws javax.naming.NamingException
count
in interface Index
javax.naming.NamingException
Index.count(java.lang.Object, boolean)
public java.math.BigInteger forwardLookup(java.lang.Object attrVal) throws javax.naming.NamingException
forwardLookup
in interface Index
javax.naming.NamingException
Index.forwardLookup(java.lang.Object)
public java.lang.Object reverseLookup(java.math.BigInteger id) throws javax.naming.NamingException
reverseLookup
in interface Index
javax.naming.NamingException
Index.reverseLookup(java.math.BigInteger)
public void add(java.lang.Object attrVal, java.math.BigInteger id) throws javax.naming.NamingException
add
in interface Index
javax.naming.NamingException
Index.add(java.lang.Object,
java.math.BigInteger)
public void add(javax.naming.directory.Attribute attr, java.math.BigInteger id) throws javax.naming.NamingException
add
in interface Index
javax.naming.NamingException
Index.add(
javax.naming.directory.Attribute, java.math.BigInteger)
public void add(javax.naming.directory.Attributes attrs, java.math.BigInteger id) throws javax.naming.NamingException
add
in interface Index
javax.naming.NamingException
Index.add(
javax.naming.directory.Attributes, java.math.BigInteger)
public void drop(java.lang.Object attrVal, java.math.BigInteger id) throws javax.naming.NamingException
drop
in interface Index
javax.naming.NamingException
Index.drop(java.lang.Object,
java.math.BigInteger)
public void drop(java.math.BigInteger entryId) throws javax.naming.NamingException
drop
in interface Index
javax.naming.NamingException
Index.drop(java.math.BigInteger)
public void drop(javax.naming.directory.Attribute attr, java.math.BigInteger id) throws javax.naming.NamingException
Index
drop
in interface Index
javax.naming.NamingException
Index.drop(
javax.naming.directory.Attribute, java.math.BigInteger)
public void drop(javax.naming.directory.Attributes attrs, java.math.BigInteger id) throws javax.naming.NamingException
Index
drop
in interface Index
javax.naming.NamingException
Index.drop(
javax.naming.directory.Attributes, java.math.BigInteger)
public IndexEnumeration listReverseIndices(java.math.BigInteger id) throws javax.naming.NamingException
listReverseIndices
in interface Index
javax.naming.NamingException
Index.listReverseIndices(BigInteger)
public IndexEnumeration listIndices() throws javax.naming.NamingException
listIndices
in interface Index
javax.naming.NamingException
Index.listIndices()
public IndexEnumeration listIndices(java.lang.Object attrVal) throws javax.naming.NamingException
listIndices
in interface Index
javax.naming.NamingException
Index.listIndices(java.lang.Object)
public IndexEnumeration listIndices(java.lang.Object attrVal, boolean isGreaterThan) throws javax.naming.NamingException
listIndices
in interface Index
javax.naming.NamingException
Index.listIndices(java.lang.Object,
boolean)
public IndexEnumeration listIndices(java.util.regex.Pattern regex) throws javax.naming.NamingException
listIndices
in interface Index
javax.naming.NamingException
Index#listIndices(org.apache.regexp.RE)
public IndexEnumeration listIndices(java.util.regex.Pattern regex, java.lang.String prefix) throws javax.naming.NamingException
listIndices
in interface Index
javax.naming.NamingException
Index#listIndices(org.apache.regexp.RE,
java.lang.String)
public boolean hasValue(java.lang.Object attrVal, java.math.BigInteger id) throws javax.naming.NamingException
hasValue
in interface Index
javax.naming.NamingException
Index.hasValue(java.lang.Object,
java.math.BigInteger)
public boolean hasValue(java.lang.Object attrVal, java.math.BigInteger id, boolean isGreaterThan) throws javax.naming.NamingException
hasValue
in interface Index
javax.naming.NamingException
Index.hasValue(java.lang.Object,
java.math.BigInteger, boolean)
public boolean hasValue(java.util.regex.Pattern regex, java.math.BigInteger id) throws javax.naming.NamingException
hasValue
in interface Index
javax.naming.NamingException
Index#hasValue(org.apache.regexp.RE,
java.math.BigInteger)
public void close() throws javax.naming.NamingException
close
in interface Index
javax.naming.NamingException
Index.close()
public void sync() throws javax.naming.NamingException
sync
in interface Index
javax.naming.NamingException
Index.sync()
public java.lang.Object getNormalized(java.lang.Object attrVal) throws javax.naming.NamingException
getNormalized
in interface Index
attrVal
- the user provided value to normalize
javax.naming.NamingException
- if something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |