T - public abstract class DelegatingCursor<T> extends Object implements Cursor<T>
DelegatingCursor is a base Cursor implementation that temporarily holds data fetched in one run and
delegates iteration.| Modifier and Type | Class and Description |
|---|---|
static class |
DelegatingCursor.PartialResult<T>
DelegatingCursor.PartialResult provided by a round trip to SolrClient loading data for an iteration. |
Cursor.State| Modifier | Constructor and Description |
|---|---|
protected |
DelegatingCursor(org.apache.solr.client.solrj.SolrQuery query) |
protected |
DelegatingCursor(org.apache.solr.client.solrj.SolrQuery query,
String initalCursorMark) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
doClose()
Customization hook for clean up operations
|
protected abstract DelegatingCursor.PartialResult<T> |
doLoad(org.apache.solr.client.solrj.SolrQuery nativeQuery)
Read data from Solr.
|
protected void |
doOpen(String cursorMark)
Customization hook for
open(). |
String |
getCursorMark()
Get the current set cursorMark
|
long |
getPosition() |
boolean |
hasNext() |
boolean |
isClosed() |
boolean |
isFinished() |
boolean |
isOpen() |
boolean |
isReady() |
protected T |
moveNext(Iterator<T> source)
Move one position next in given source.
|
T |
next() |
DelegatingCursor<T> |
open()
Opens the cursor.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected DelegatingCursor(org.apache.solr.client.solrj.SolrQuery query)
protected DelegatingCursor(org.apache.solr.client.solrj.SolrQuery query,
String initalCursorMark)
protected T moveNext(Iterator<T> source)
source - protected abstract DelegatingCursor.PartialResult<T> doLoad(org.apache.solr.client.solrj.SolrQuery nativeQuery)
nativeQuery - The query to execute already positioned at the next cursor mark.public DelegatingCursor<T> open()
CursorCursor.State.READY cursors can be opened.protected void doOpen(@Nullable String cursorMark)
open().cursorMark - public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected void doClose()
public long getPosition()
getPosition in interface Cursor<T>@Nullable public String getCursorMark()
CursorgetCursorMark in interface Cursor<T>public boolean isReady()
State#REDAYpublic boolean isOpen()
isOpen in interface Cursor<T>Cursor.State.OPENpublic boolean isFinished()
State#FINISHEDpublic boolean isClosed()
isClosed in interface Cursor<T>Cursor.State.CLOSEDCopyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.