public class DescendantCursor extends AbstractIndexCursor<java.lang.String>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
baseId
The initial entry ID we are looking descendants for
|
private org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> |
currentCursor
The current Cursor over the entries in the scope of the search base
|
private java.lang.String |
currentParentId
The current Parent ID
|
private org.apache.commons.collections.ArrayStack |
cursorStack
The stack of cursors used to process the depth-first traversal
|
private Store |
db
The entry database/store
|
protected static boolean |
INNER |
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG_CURSOR
A dedicated log for cursors
|
private org.apache.commons.collections.ArrayStack |
parentIdStack
The stack of parentIds used to process the depth-first traversal
|
private IndexEntry |
prefetched
The prefetched element
|
protected static boolean |
TOP_LEVEL |
private boolean |
topLevel
A flag to tell that we are in the top level cursor or not
|
private static java.lang.String |
UNSUPPORTED_MSG
Error message for unsupported operations
|
| Constructor and Description |
|---|
DescendantCursor(Store db,
java.lang.String baseId,
java.lang.String parentId,
org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> cursor)
Creates a Cursor over entries satisfying one level scope criteria.
|
DescendantCursor(Store db,
java.lang.String baseId,
java.lang.String parentId,
org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> cursor,
boolean topLevel)
Creates a Cursor over entries satisfying one level scope criteria.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterLast() |
void |
beforeFirst() |
void |
close() |
void |
close(java.lang.Exception cause) |
private java.lang.String |
dumpCursors(java.lang.String tabs)
Dumps the cursors
|
boolean |
first() |
IndexEntry<java.lang.String,java.lang.String> |
get() |
protected java.lang.String |
getUnsupportedMessage()
Gets the message to return for operations that are not supported
|
boolean |
last() |
boolean |
next() |
boolean |
previous() |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String tabs) |
after, available, before, setAvailablecheckNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitorprivate static final org.slf4j.Logger LOG_CURSOR
private static final boolean IS_DEBUG
private static final java.lang.String UNSUPPORTED_MSG
private final Store db
private IndexEntry prefetched
private org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> currentCursor
private java.lang.String currentParentId
private org.apache.commons.collections.ArrayStack cursorStack
private org.apache.commons.collections.ArrayStack parentIdStack
private java.lang.String baseId
private boolean topLevel
protected static final boolean TOP_LEVEL
protected static final boolean INNER
public DescendantCursor(Store db, java.lang.String baseId, java.lang.String parentId, org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> cursor) throws java.lang.Exception
db - the entry storeevaluator - an IndexEntry (candidate) evaluatorjava.lang.Exception - on db access failurespublic DescendantCursor(Store db, java.lang.String baseId, java.lang.String parentId, org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<ParentIdAndRdn,java.lang.String>> cursor, boolean topLevel) throws java.lang.Exception
db - the entry storeevaluator - an IndexEntry (candidate) evaluatorjava.lang.Exception - on db access failuresprotected java.lang.String getUnsupportedMessage()
getUnsupportedMessage in class AbstractIndexCursor<java.lang.String>public void beforeFirst()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void afterLast()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean first()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean last()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean previous()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic boolean next()
throws org.apache.directory.api.ldap.model.exception.LdapException,
org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic IndexEntry<java.lang.String,java.lang.String> get() throws org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void close()
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<java.lang.String,java.lang.String>>close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<java.lang.String,java.lang.String>>public void close(java.lang.Exception cause)
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<java.lang.String,java.lang.String>>close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<java.lang.String,java.lang.String>>private java.lang.String dumpCursors(java.lang.String tabs)
public java.lang.String toString(java.lang.String tabs)
toString in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<java.lang.String,java.lang.String>>toString in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<java.lang.String,java.lang.String>>Object.toString()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()