class MavibotCursor<K,V>
extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<org.apache.directory.api.ldap.model.cursor.Tuple<K,V>>
| Modifier and Type | Field and Description |
|---|---|
private org.apache.directory.mavibot.btree.TupleCursor<K,V> |
browser
The Tuple browser
|
private static org.slf4j.Logger |
LOG_CURSOR
A dedicated log for cursors
|
private org.apache.directory.api.ldap.model.cursor.Tuple<K,V> |
returnedTuple
The tuple which will be returned
|
private MavibotTable<K,V> |
table
The table we are building a cursor over
|
private boolean |
valueAvailable
A flag set when there is a Tuple available
|
| Constructor and Description |
|---|
MavibotCursor(MavibotTable<K,V> table)
Creates a Cursor over the tuples of a Mavibot table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(org.apache.directory.api.ldap.model.cursor.Tuple<K,V> element) |
void |
afterKey(K key)
Sets the position before a given key
|
void |
afterLast() |
void |
afterValue(K key,
V value)
Sets the position after a given key and a given value for this key
|
boolean |
available() |
void |
before(org.apache.directory.api.ldap.model.cursor.Tuple<K,V> element) |
void |
beforeFirst() |
void |
beforeKey(K key)
Sets the position before a given key
|
void |
beforeValue(K key,
V value)
Sets the position before a given key and a given value for this key
|
private void |
clearValue()
Cleanup the returned tuple before reusing it.
|
void |
close() |
void |
close(java.lang.Exception cause) |
private void |
closeBrowser(org.apache.directory.mavibot.btree.TupleCursor<K,V> browser)
Close the browser
|
boolean |
first() |
org.apache.directory.api.ldap.model.cursor.Tuple<K,V> |
get() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitor, toStringprivate static final org.slf4j.Logger LOG_CURSOR
private final MavibotTable<K,V> table
private org.apache.directory.api.ldap.model.cursor.Tuple<K,V> returnedTuple
private boolean valueAvailable
public MavibotCursor(MavibotTable<K,V> table)
table - the JDBM Table to build a Cursor overprivate void clearValue()
public boolean available()
public void beforeKey(K key) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
key - The key we want to start withorg.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void afterKey(K key) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
key - The key we want to start withorg.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void beforeValue(K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
key - The key we want to start withvalue - The value we want to start withorg.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void afterValue(K key, V value) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
key - The key we want to start withvalue - The value we want to start withorg.apache.directory.api.ldap.model.exception.LdapExceptionorg.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void before(org.apache.directory.api.ldap.model.cursor.Tuple<K,V> element) 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 after(org.apache.directory.api.ldap.model.cursor.Tuple<K,V> element) 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 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 org.apache.directory.api.ldap.model.cursor.Tuple<K,V> get() throws org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.cursor.CursorExceptionpublic void close()
public void close(java.lang.Exception cause)