public abstract class AbstractIndex<K,ID> extends Object implements Index<K,ID>
| Modifier and Type | Field and Description |
|---|---|
protected String |
attributeId
The attribute identifier for this index
|
protected org.apache.directory.api.ldap.model.schema.AttributeType |
attributeType
the attribute type resolved for this JdbmIndex
|
protected int |
cacheSize
the size (number of index entries) for the cache
|
protected AtomicInteger |
commitNumber
A counter used to differ the commit on disk after N operations
|
protected boolean |
initialized
whether or not this index has been initialized
|
protected boolean |
withReverse
Tells if this index has a Reverse table
|
DEFAULT_INDEX_CACHE_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIndex()
Creates a new instance of AbstractIndex.
|
protected |
AbstractIndex(boolean withReverse)
Creates a new instance of AbstractIndex.
|
protected |
AbstractIndex(String attributeId,
boolean withReverse)
Creates a new instance of AbstractIndex.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.directory.api.ldap.model.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.
|
boolean |
hasReverse()
Tells if the index has a reverse table or not
|
boolean |
isDupsEnabled()
tells whether the Index implementation supports storing duplicate keys
|
protected void |
protect(String property)
Protects configuration properties from being set after initialization.
|
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)
Sets the size of the index cache in terms of the number of index entries to be cached.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, close, count, count, drop, drop, forward, forward, forwardCursor, forwardCursor, forwardLookup, forwardValueCursor, getWkDirPath, greaterThanCount, lessThanCount, reverse, reverse, reverseCursor, reverseCursor, reverseLookup, reverseValueCursor, setWkDirPath, syncprotected String attributeId
protected org.apache.directory.api.ldap.model.schema.AttributeType attributeType
protected int cacheSize
protected boolean initialized
protected boolean withReverse
protected AtomicInteger commitNumber
protected AbstractIndex()
attributeId - the attribute IDprotected AbstractIndex(boolean withReverse)
attributeId - the attribute IDprotected AbstractIndex(String attributeId, boolean withReverse)
attributeId - the attribute IDpublic String getAttributeId()
IndexgetAttributeId in interface Index<K,ID>public org.apache.directory.api.ldap.model.schema.AttributeType getAttribute()
getAttribute in interface Index<K,ID>public void setAttributeId(String attributeId)
IndexsetAttributeId in interface Index<K,ID>attributeId - configured attribute oid or alias namepublic boolean isDupsEnabled()
isDupsEnabled in interface Index<K,ID>public int getCacheSize()
getCacheSize in interface Index<K,ID>public void setCacheSize(int cacheSize)
setCacheSize in interface Index<K,ID>cacheSize - the size of the index cacheprotected void protect(String property)
property - the property to protectpublic boolean hasReverse()
hasReverse in interface Index<K,ID>Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.