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 java.lang.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 Type Method Description voidonFailedFetchPhase(SearchContext searchContext)Executed if a fetch phased failed.voidonFailedQueryPhase(SearchContext searchContext)Executed if a query phased failed.voidonFetchPhase(SearchContext searchContext, long tookInNanos)Executed after the fetch phase successfully finished.voidonFreeContext(SearchContext context)Executed when a previously created search context is freed.voidonFreeScrollContext(SearchContext context)Executed when a scroll searchSearchContextis freed.voidonNewContext(SearchContext context)Executed when a new search context was createdvoidonNewScrollContext(SearchContext context)Executed when a new scroll searchSearchContextwas createdvoidonPreFetchPhase(SearchContext searchContext)Executed before the fetch phase is executedvoidonPreQueryPhase(SearchContext searchContext)Executed before the query phase is executedvoidonQueryPhase(SearchContext searchContext, long tookInNanos)Executed after the query phase successfully finished.voidvalidateSearchContext(SearchContext context, TransportRequest request)Executed prior to using aSearchContextthat has been retrieved from the active contexts.
-
Method Details
-
onPreQueryPhase
Description copied from interface:SearchOperationListenerExecuted before the query phase is executed- Specified by:
onPreQueryPhasein interfaceSearchOperationListener- Parameters:
searchContext- the current search context
-
onFailedQueryPhase
Description copied from interface:SearchOperationListenerExecuted if a query phased failed.- Specified by:
onFailedQueryPhasein interfaceSearchOperationListener- Parameters:
searchContext- the current search context
-
onQueryPhase
Description copied from interface:SearchOperationListenerExecuted after the query phase successfully finished. Note: this is not invoked if the query phase execution failed.- Specified by:
onQueryPhasein 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:SearchOperationListenerExecuted before the fetch phase is executed- Specified by:
onPreFetchPhasein interfaceSearchOperationListener- Parameters:
searchContext- the current search context
-
onFailedFetchPhase
Description copied from interface:SearchOperationListenerExecuted if a fetch phased failed.- Specified by:
onFailedFetchPhasein interfaceSearchOperationListener- Parameters:
searchContext- the current search context
-
onFetchPhase
Description copied from interface:SearchOperationListenerExecuted after the fetch phase successfully finished. Note: this is not invoked if the fetch phase execution failed.- Specified by:
onFetchPhasein interfaceSearchOperationListener- Parameters:
searchContext- the current search contexttookInNanos- the number of nanoseconds the fetch execution took- See Also:
SearchOperationListener.onFailedFetchPhase(SearchContext)
-
onNewContext
Description copied from interface:SearchOperationListenerExecuted when a new search context was created- Specified by:
onNewContextin interfaceSearchOperationListener- Parameters:
context- the created context
-
onFreeContext
Description copied from interface:SearchOperationListenerExecuted when a previously created search 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:
onFreeContextin interfaceSearchOperationListener- Parameters:
context- the freed search context
-
onNewScrollContext
Description copied from interface:SearchOperationListenerExecuted when a new scroll searchSearchContextwas created- Specified by:
onNewScrollContextin interfaceSearchOperationListener- Parameters:
context- the created search context
-
onFreeScrollContext
Description copied from interface:SearchOperationListenerExecuted when a scroll searchSearchContextis 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:
onFreeScrollContextin interfaceSearchOperationListener- Parameters:
context- the freed search context
-
validateSearchContext
Description copied from interface:SearchOperationListenerExecuted prior to using aSearchContextthat 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:
validateSearchContextin interfaceSearchOperationListener- Parameters:
context- the context retrieved from the active contextsrequest- the request that is going to use the search context
-