public abstract class AbstractIndex<K,E> extends Object implements Index<K,E>
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, wait
add, close, count, count, drop, drop, forward, forward, forwardCursor, forwardCursor, forwardLookup, forwardValueCursor, getWkDirPath, greaterThanCount, lessThanCount, reverse, reverse, reverseLookup, reverseValueCursor, setWkDirPath
protected 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()
protected AbstractIndex(boolean withReverse)
withReverse
- If we should create a reverse indexprotected AbstractIndex(String attributeId, boolean withReverse)
attributeId
- the attribute IDwithReverse
- If we should create a reverse indexpublic String getAttributeId()
Index
getAttributeId
in interface Index<K,E>
public org.apache.directory.api.ldap.model.schema.AttributeType getAttribute()
getAttribute
in interface Index<K,E>
public void setAttributeId(String attributeId)
Index
setAttributeId
in interface Index<K,E>
attributeId
- configured attribute oid or alias namepublic boolean isDupsEnabled()
isDupsEnabled
in interface Index<K,E>
public int getCacheSize()
getCacheSize
in interface Index<K,E>
public void setCacheSize(int cacheSize)
setCacheSize
in interface Index<K,E>
cacheSize
- the size of the index cacheprotected void protect(String property)
property
- the property to protectpublic boolean hasReverse()
hasReverse
in interface Index<K,E>
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.