Package org.elasticsearch.index.shard
Class SearchOperationListener.CompositeListener
java.lang.Object
org.elasticsearch.index.shard.SearchOperationListener.CompositeListener
- All Implemented Interfaces:
SearchOperationListener
- Enclosing interface:
- SearchOperationListener
public static final class SearchOperationListener.CompositeListener
extends Object
implements SearchOperationListener
A Composite listener that multiplexes calls to each of the listeners methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.shard.SearchOperationListener
SearchOperationListener.CompositeListener
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onFailedFetchPhase(SearchContext searchContext)
Executed if a fetch phased failed.void
onFailedQueryPhase(SearchContext searchContext)
Executed if a query phased failed.void
onFetchPhase(SearchContext searchContext, long tookInNanos)
Executed after the fetch phase successfully finished.void
onFreeReaderContext(ReaderContext readerContext)
Executed when a previously created reader context is freed.void
onFreeScrollContext(ReaderContext readerContext)
Executed when a scroll searchSearchContext
is freed.void
onNewReaderContext(ReaderContext readerContext)
Executed when a new reader context was createdvoid
onNewScrollContext(ReaderContext readerContext)
Executed when a new scroll searchReaderContext
was createdvoid
onPreFetchPhase(SearchContext searchContext)
Executed before the fetch phase is executedvoid
onPreQueryPhase(SearchContext searchContext)
Executed before the query phase is executedvoid
onQueryPhase(SearchContext searchContext, long tookInNanos)
Executed after the query phase successfully finished.void
validateReaderContext(ReaderContext readerContext, TransportRequest request)
Executed prior to using aReaderContext
that has been retrieved from the active contexts.
-
Method Details
-
onPreQueryPhase
Description copied from interface:SearchOperationListener
Executed before the query phase is executed- Specified by:
onPreQueryPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search context
-
onFailedQueryPhase
Description copied from interface:SearchOperationListener
Executed if a query phased failed.- Specified by:
onFailedQueryPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search context
-
onQueryPhase
Description copied from interface:SearchOperationListener
Executed after the query phase successfully finished. Note: this is not invoked if the query phase execution failed.- Specified by:
onQueryPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search contexttookInNanos
- the number of nanoseconds the query execution took- See Also:
SearchOperationListener.onFailedQueryPhase(SearchContext)
-
onPreFetchPhase
Description copied from interface:SearchOperationListener
Executed before the fetch phase is executed- Specified by:
onPreFetchPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search context
-
onFailedFetchPhase
Description copied from interface:SearchOperationListener
Executed if a fetch phased failed.- Specified by:
onFailedFetchPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search context
-
onFetchPhase
Description copied from interface:SearchOperationListener
Executed after the fetch phase successfully finished. Note: this is not invoked if the fetch phase execution failed.- Specified by:
onFetchPhase
in interfaceSearchOperationListener
- Parameters:
searchContext
- the current search contexttookInNanos
- the number of nanoseconds the fetch execution took- See Also:
SearchOperationListener.onFailedFetchPhase(SearchContext)
-
onNewReaderContext
Description copied from interface:SearchOperationListener
Executed when a new reader context was created- Specified by:
onNewReaderContext
in interfaceSearchOperationListener
- Parameters:
readerContext
- the created context
-
onFreeReaderContext
Description copied from interface:SearchOperationListener
Executed when a previously created reader context is freed. This happens either when the search execution finishes, if the execution failed or if the search context as idle for and needs to be cleaned up.- Specified by:
onFreeReaderContext
in interfaceSearchOperationListener
- Parameters:
readerContext
- the freed reader context
-
onNewScrollContext
Description copied from interface:SearchOperationListener
Executed when a new scroll searchReaderContext
was created- Specified by:
onNewScrollContext
in interfaceSearchOperationListener
- Parameters:
readerContext
- the created reader context
-
onFreeScrollContext
Description copied from interface:SearchOperationListener
Executed when a scroll searchSearchContext
is freed. This happens either when the scroll search execution finishes, if the execution failed or if the search context as idle for and needs to be cleaned up.- Specified by:
onFreeScrollContext
in interfaceSearchOperationListener
- Parameters:
readerContext
- the freed search context
-
validateReaderContext
Description copied from interface:SearchOperationListener
Executed prior to using aReaderContext
that has been retrieved from the active contexts. If the context is deemed invalid a runtime exception can be thrown, which will prevent the context from being used.- Specified by:
validateReaderContext
in interfaceSearchOperationListener
- Parameters:
readerContext
- The reader context used by this request.request
- the request that is going to use the search context
-