DEFAULT_INDEX_CACHE_SIZE
Constructor and Description |
---|
AvlIndex() |
AvlIndex(String attributeId) |
Modifier and Type | Method and Description |
---|---|
void |
add(K attrVal,
Long id) |
void |
close() |
int |
count()
Gets the total scan count for this index.
|
int |
count(K attrVal)
Gets the scan count for the occurance of a specific attribute value
within the index.
|
void |
drop(K attrVal,
Long id) |
void |
drop(Long id)
Remove all the reference to an entry from the index.
|
boolean |
forward(K attrVal) |
boolean |
forward(K attrVal,
Long id) |
IndexCursor<K,O,Long> |
forwardCursor() |
IndexCursor<K,O,Long> |
forwardCursor(K key) |
boolean |
forwardGreaterOrEq(K attrVal) |
boolean |
forwardGreaterOrEq(K attrVal,
Long id) |
boolean |
forwardLessOrEq(K attrVal) |
boolean |
forwardLessOrEq(K attrVal,
Long id) |
Long |
forwardLookup(K attrVal) |
org.apache.directory.shared.ldap.cursor.Cursor<Long> |
forwardValueCursor(K key) |
org.apache.directory.shared.ldap.schema.AttributeType |
getAttribute()
Gets the attribute this Index is built upon.
|
String |
getAttributeId()
Gets the attribute identifier set at configuration time for this index which may not
be the OID but an alias name for the attributeType associated with this Index
|
int |
getCacheSize()
Gets the size of the index cache in terms of the number of index entries to be cached.
|
K |
getNormalized(K attrVal)
Gets the normalized value for an attribute.
|
File |
getWkDirPath()
this method always returns null for AvlIndex cause this is a in-memory index.
|
int |
greaterThanCount(K attrVal) |
boolean |
isCountExact()
Checks whether or not calls to count the number of keys greater than or
less than the key are exact.
|
int |
lessThanCount(K attrVal) |
boolean |
reverse(Long id) |
boolean |
reverse(Long id,
K attrVal) |
IndexCursor<K,O,Long> |
reverseCursor() |
IndexCursor<K,O,Long> |
reverseCursor(Long id) |
boolean |
reverseGreaterOrEq(Long id) |
boolean |
reverseGreaterOrEq(Long id,
K attrVal) |
boolean |
reverseLessOrEq(Long id) |
boolean |
reverseLessOrEq(Long id,
K attrVal) |
K |
reverseLookup(Long id) |
org.apache.directory.shared.ldap.cursor.Cursor<K> |
reverseValueCursor(Long id) |
void |
setAttributeId(String attributeId)
Sets the attribute identifier set at configuration time for this index which may not
be the OID but an alias name for the attributeType associated with this Index
|
void |
setCacheSize(int cacheSize)
throws UnsupportedOperationException cause it is a in-memory index
|
void |
setWkDirPath(File wkDirPath)
throws UnsupportedOperationException cause it is a in-memory index
|
void |
sync() |
public AvlIndex()
public AvlIndex(String attributeId)
public void close() throws Exception
public int count() throws Exception
public int count(K attrVal) throws Exception
public void drop(Long id) throws Exception
public IndexCursor<K,O,Long> forwardCursor() throws Exception
public org.apache.directory.shared.ldap.cursor.Cursor<Long> forwardValueCursor(K key) throws Exception
public org.apache.directory.shared.ldap.schema.AttributeType getAttribute()
getAttribute
in interface Index<K,O,Long>
public String getAttributeId()
getAttributeId
in interface Index<K,O,Long>
public K getNormalized(K attrVal) throws Exception
public boolean isCountExact()
isCountExact
in interface Index<K,O,Long>
public IndexCursor<K,O,Long> reverseCursor() throws Exception
public org.apache.directory.shared.ldap.cursor.Cursor<K> reverseValueCursor(Long id) throws Exception
public void setAttributeId(String attributeId)
setAttributeId
in interface Index<K,O,Long>
attributeId
- configured attribute oid or alias namepublic void setWkDirPath(File wkDirPath)
setWkDirPath
in interface Index<K,O,Long>
wkDirPath
- optional working directory pathpublic File getWkDirPath()
getWkDirPath
in interface Index<K,O,Long>
public void setCacheSize(int cacheSize)
setCacheSize
in interface Index<K,O,Long>
cacheSize
- the size of the index cachepublic int getCacheSize()
Index
getCacheSize
in interface Index<K,O,Long>
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.