|
||||||||||
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.IndexCursorAdaptor<K,O,ID>
public class IndexCursorAdaptor<K,O,ID>
A Cursor which adapts an underlying Tuple based Cursor to one which returns IndexEntry objects rather than tuples.
Constructor Summary | |
---|---|
IndexCursorAdaptor(org.apache.directory.shared.ldap.cursor.Cursor<Tuple> wrappedCursor,
boolean forwardIndex)
Creates an IndexCursorAdaptor which wraps and adapts a Cursor from a table to one which returns an IndexEntry. |
Method Summary | |
---|---|
void |
after(IndexEntry<K,O,ID> element)
|
void |
afterLast()
|
void |
afterValue(ID id,
K key)
An alternative to calling after(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. |
boolean |
available()
|
void |
before(IndexEntry<K,O,ID> element)
|
void |
beforeFirst()
|
void |
beforeValue(ID id,
K key)
An alternative to calling before(IndexEntry) which often may require wrapping an id and value in a newly created IndexEntry object that may be an unnecessary object creation. |
void |
close()
|
void |
close(java.lang.Exception reason)
|
boolean |
first()
|
IndexEntry<K,O,ID> |
get()
|
boolean |
isClosed()
|
boolean |
isElementReused()
|
java.util.Iterator<IndexEntry<K,O,ID>> |
iterator()
|
boolean |
last()
|
boolean |
next()
|
boolean |
previous()
|
void |
setClosureMonitor(org.apache.directory.shared.ldap.cursor.ClosureMonitor monitor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexCursorAdaptor(org.apache.directory.shared.ldap.cursor.Cursor<Tuple> wrappedCursor, boolean forwardIndex)
wrappedCursor
- the Cursor being adaptedforwardIndex
- true for a cursor over a forward index, false for
one over a reverse indexMethod Detail |
---|
public boolean available()
available
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
public void beforeValue(ID id, K key) throws java.lang.Exception
IndexCursor
beforeValue
in interface IndexCursor<K,O,ID>
id
- the id for the entrykey
- the value to advance just before
java.lang.Exception
- if there are faults performing this operationpublic void afterValue(ID id, K key) throws java.lang.Exception
IndexCursor
afterValue
in interface IndexCursor<K,O,ID>
id
- the id for the entrykey
- the value to advance just after the last value
java.lang.Exception
- if there are faults performing this operationpublic void before(IndexEntry<K,O,ID> element) throws java.lang.Exception
before
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public void after(IndexEntry<K,O,ID> element) throws java.lang.Exception
after
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public void beforeFirst() throws java.lang.Exception
beforeFirst
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public void afterLast() throws java.lang.Exception
afterLast
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean first() throws java.lang.Exception
first
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean last() throws java.lang.Exception
last
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean isClosed() throws java.lang.Exception
isClosed
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean previous() throws java.lang.Exception
previous
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean next() throws java.lang.Exception
next
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public IndexEntry<K,O,ID> get() throws java.lang.Exception
get
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public boolean isElementReused()
isElementReused
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
public final void setClosureMonitor(org.apache.directory.shared.ldap.cursor.ClosureMonitor monitor)
setClosureMonitor
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
public void close() throws java.lang.Exception
close
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public void close(java.lang.Exception reason) throws java.lang.Exception
close
in interface org.apache.directory.shared.ldap.cursor.Cursor<IndexEntry<K,O,ID>>
java.lang.Exception
public java.util.Iterator<IndexEntry<K,O,ID>> iterator()
iterator
in interface java.lang.Iterable<IndexEntry<K,O,ID>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |