public class IndexCursorAdaptor<K> extends AbstractIndexCursor<K>
partitionTxn, UNSUPPORTED_MSG
Constructor and Description |
---|
IndexCursorAdaptor(PartitionTxn partitionTxn,
org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple> wrappedCursor,
boolean forwardIndex)
Creates an IndexCursorAdaptor which wraps and adapts a Cursor from a table to
one which returns an IndexEntry.
|
Modifier and Type | Method and Description |
---|---|
void |
after(IndexEntry<K,String> element) |
void |
afterLast() |
boolean |
available() |
void |
before(IndexEntry<K,String> element) |
void |
beforeFirst() |
void |
close() |
void |
close(Exception reason) |
boolean |
first() |
IndexEntry<K,String> |
get() |
protected String |
getUnsupportedMessage()
Gets the message to return for operations that are not supported
|
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
Iterator<IndexEntry<K,String>> |
iterator() |
boolean |
last() |
boolean |
next() |
boolean |
previous() |
void |
setClosureMonitor(org.apache.directory.api.ldap.model.cursor.ClosureMonitor monitor) |
String |
toString() |
String |
toString(String tabs) |
setAvailable
checkNotClosed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public IndexCursorAdaptor(PartitionTxn partitionTxn, org.apache.directory.api.ldap.model.cursor.Cursor<org.apache.directory.api.ldap.model.cursor.Tuple> wrappedCursor, boolean forwardIndex)
partitionTxn
- The transaction to usewrappedCursor
- the Cursor being adaptedforwardIndex
- true for a cursor over a forward index, false for
one over a reverse indexpublic boolean available()
available
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
available
in class AbstractIndexCursor<K>
public void before(IndexEntry<K,String> element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
before
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
before
in class AbstractIndexCursor<K>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public void after(IndexEntry<K,String> element) throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
after
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
after
in class AbstractIndexCursor<K>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
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.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public 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.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public 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.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public 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.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean isClosed()
isClosed
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
isClosed
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public boolean previous() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
previous
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
previous
in class AbstractIndexCursor<K>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public boolean next() throws org.apache.directory.api.ldap.model.exception.LdapException, org.apache.directory.api.ldap.model.cursor.CursorException
next
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
next
in class AbstractIndexCursor<K>
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
public IndexEntry<K,String> get() throws org.apache.directory.api.ldap.model.cursor.CursorException
org.apache.directory.api.ldap.model.cursor.CursorException
public final void setClosureMonitor(org.apache.directory.api.ldap.model.cursor.ClosureMonitor monitor)
setClosureMonitor
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
setClosureMonitor
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
IOException
public void close(Exception reason) throws IOException
close
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
close
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
IOException
public Iterator<IndexEntry<K,String>> iterator()
iterator
in interface Iterable<IndexEntry<K,String>>
iterator
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public boolean isAfterLast()
isAfterLast
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
isAfterLast
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public boolean isBeforeFirst()
isBeforeFirst
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
isBeforeFirst
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public boolean isFirst()
isFirst
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
isFirst
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
public boolean isLast()
isLast
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
isLast
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
protected String getUnsupportedMessage()
getUnsupportedMessage
in class AbstractIndexCursor<K>
public String toString(String tabs)
toString
in interface org.apache.directory.api.ldap.model.cursor.Cursor<IndexEntry<K,String>>
toString
in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<IndexEntry<K,String>>
Object.toString()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.