public class SearchCursorImpl extends AbstractCursor<Response> implements SearchCursor
| Modifier and Type | Field and Description |
|---|---|
private boolean |
done
the done flag
|
private SearchFuture |
future
the search future
|
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
LOG_CURSOR
A dedicated log for cursors
|
private Response |
response
a reference to hold the retrieved SearchResponse object from SearchFuture
|
private SearchResultDone |
searchDoneResp
a reference to hold the SearchResultDone response
|
private long |
timeout
wait time while polling for a SearchResponse
|
private java.util.concurrent.TimeUnit |
timeUnit
time units of timeout value
|
| Constructor and Description |
|---|
SearchCursorImpl(SearchFuture future,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
Instantiates a new search cursor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(Response element)
This operation is not supported in SearchCursor.
|
void |
afterLast()
This operation is not supported in SearchCursor.
|
boolean |
available()
Determines whether or not a call to get() will succeed.
|
void |
before(Response element)
This operation is not supported in SearchCursor.
|
void |
beforeFirst()
This operation is not supported in SearchCursor.
|
void |
close()
Closes this Cursor and frees any resources it my have allocated.
|
void |
close(java.lang.Exception cause)
Closes this Cursor and frees any resources it my have allocated.
|
boolean |
first()
This operation is not supported in SearchCursor.
|
Response |
get()
Gets the object at the current position.
|
Entry |
getEntry() |
IntermediateResponse |
getIntermediate() |
Referral |
getReferral() |
SearchResultDone |
getSearchResultDone()
gives the SearchResultDone message received at the end of search results
|
boolean |
isDone() |
boolean |
isEntry() |
boolean |
isIntermediate() |
boolean |
isReferral() |
boolean |
last()
This operation is not supported in SearchCursor.
|
boolean |
next()
Advances this Cursor to the next position.
|
boolean |
previous()
This operation is not supported in SearchCursor.
|
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, iterator, setClosureMonitor, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAfterLast, isBeforeFirst, isClosed, isFirst, isLast, setClosureMonitor, toStringprivate static final org.slf4j.Logger LOG_CURSOR
private static final boolean IS_DEBUG
private SearchFuture future
private long timeout
private java.util.concurrent.TimeUnit timeUnit
private Response response
private boolean done
private SearchResultDone searchDoneResp
public SearchCursorImpl(SearchFuture future, long timeout, java.util.concurrent.TimeUnit timeUnit)
future - the futuretimeout - the timeouttimeUnit - the time unitpublic boolean next()
throws LdapException,
CursorException
next in interface Cursor<Response>LdapException - if we have get any LDAP exception while operating
the cursorCursorException - if there are problems advancing to this Cursor to
the next position, or if this Cursor is closedpublic Response get() throws InvalidCursorPositionException
get in interface Cursor<Response>InvalidCursorPositionExceptionpublic SearchResultDone getSearchResultDone()
getSearchResultDone in interface SearchCursorpublic boolean available()
public void close()
public void close(java.lang.Exception cause)
public void after(Response element) throws LdapException, CursorException
after in interface Cursor<Response>element - the element to be positioned afterLdapExceptionCursorExceptionpublic void afterLast()
throws LdapException,
CursorException
afterLast in interface Cursor<Response>LdapExceptionCursorExceptionpublic void before(Response element) throws LdapException, CursorException
before in interface Cursor<Response>element - the element to be positioned beforeLdapExceptionCursorExceptionpublic void beforeFirst()
throws LdapException,
CursorException
beforeFirst in interface Cursor<Response>LdapExceptionCursorExceptionpublic boolean first()
throws LdapException,
CursorException
first in interface Cursor<Response>LdapExceptionCursorExceptionpublic boolean last()
throws LdapException,
CursorException
last in interface Cursor<Response>LdapExceptionCursorExceptionpublic boolean previous()
throws LdapException,
CursorException
previous in interface Cursor<Response>LdapExceptionCursorExceptionpublic boolean isDone()
isDone in interface SearchCursorpublic boolean isReferral()
isReferral in interface SearchCursorpublic Referral getReferral() throws LdapException
getReferral in interface SearchCursorLdapException - If thepublic boolean isEntry()
isEntry in interface SearchCursorpublic Entry getEntry() throws LdapException
getEntry in interface SearchCursorLdapException - If thepublic boolean isIntermediate()
isIntermediate in interface SearchCursorpublic IntermediateResponse getIntermediate() throws LdapException
getIntermediate in interface SearchCursorLdapException - If the