Package org.elasticsearch.index.reindex
Class ClientScrollableHitSource
java.lang.Object
org.elasticsearch.index.reindex.ScrollableHitSource
org.elasticsearch.index.reindex.ClientScrollableHitSource
public class ClientScrollableHitSource extends ScrollableHitSource
A scrollable source of hits from a Client instance.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.reindex.ScrollableHitSource
ScrollableHitSource.AsyncResponse, ScrollableHitSource.BasicHit, ScrollableHitSource.Hit, ScrollableHitSource.Response, ScrollableHitSource.SearchFailure -
Field Summary
Fields inherited from class org.elasticsearch.index.reindex.ScrollableHitSource
backoffPolicy, countSearchRetry, fail, logger, threadPool -
Constructor Summary
Constructors Constructor Description ClientScrollableHitSource(org.apache.logging.log4j.Logger logger, BackoffPolicy backoffPolicy, ThreadPool threadPool, java.lang.Runnable countSearchRetry, java.util.function.Consumer<ScrollableHitSource.AsyncResponse> onResponse, java.util.function.Consumer<java.lang.Exception> fail, ParentTaskAssigningClient client, SearchRequest firstSearchRequest) -
Method Summary
Modifier and Type Method Description protected voidcleanup(java.lang.Runnable onCompletion)Called after the process has been totally finished to clean up any resources the process needed like remote connections.voidclearScroll(java.lang.String scrollId, java.lang.Runnable onCompletion)Called to clear a scroll id.voiddoStart(RejectAwareActionListener<ScrollableHitSource.Response> searchListener)protected voiddoStartNextScroll(java.lang.String scrollId, TimeValue extraKeepAlive, RejectAwareActionListener<ScrollableHitSource.Response> searchListener)Methods inherited from class org.elasticsearch.index.reindex.ScrollableHitSource
close, setScroll, start
-
Constructor Details
-
ClientScrollableHitSource
public ClientScrollableHitSource(org.apache.logging.log4j.Logger logger, BackoffPolicy backoffPolicy, ThreadPool threadPool, java.lang.Runnable countSearchRetry, java.util.function.Consumer<ScrollableHitSource.AsyncResponse> onResponse, java.util.function.Consumer<java.lang.Exception> fail, ParentTaskAssigningClient client, SearchRequest firstSearchRequest)
-
-
Method Details
-
doStart
- Specified by:
doStartin classScrollableHitSource
-
doStartNextScroll
protected void doStartNextScroll(java.lang.String scrollId, TimeValue extraKeepAlive, RejectAwareActionListener<ScrollableHitSource.Response> searchListener)- Specified by:
doStartNextScrollin classScrollableHitSource
-
clearScroll
public void clearScroll(java.lang.String scrollId, java.lang.Runnable onCompletion)Description copied from class:ScrollableHitSourceCalled to clear a scroll id.- Specified by:
clearScrollin classScrollableHitSource- Parameters:
scrollId- the id to clearonCompletion- implementers must call this after completing the clear whether they are successful or not
-
cleanup
protected void cleanup(java.lang.Runnable onCompletion)Description copied from class:ScrollableHitSourceCalled after the process has been totally finished to clean up any resources the process needed like remote connections.- Specified by:
cleanupin classScrollableHitSource- Parameters:
onCompletion- implementers must call this after completing the cleanup whether they are successful or not
-