Module org.elasticsearch.server
Class TransportGetAllSampleConfigurationAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response>
org.elasticsearch.action.support.local.TransportLocalClusterStateAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response>
org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response>
org.elasticsearch.action.admin.indices.sampling.TransportGetAllSampleConfigurationAction
public class TransportGetAllSampleConfigurationAction
extends TransportLocalProjectMetadataAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response>
Transport action for retrieving all existing sampling configurations.
This action retrieves the sampling configurations from the project metadata's custom sampling metadata.
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
clusterService, executorFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportGetAllSampleConfigurationAction(ActionFilters actionFilters, TransportService transportService, ClusterService clusterService, ProjectResolver projectResolver) Constructs a new TransportGetAllSampleConfigurationAction. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(GetAllSampleConfigurationAction.Request request, ProjectState state) Checks for cluster blocks that would prevent this operation from executing.protected voidlocalClusterStateOperation(Task task, GetAllSampleConfigurationAction.Request request, ProjectState state, ActionListener<GetAllSampleConfigurationAction.Response> listener) Executes the get all sampling configuration operation against the local cluster state.Methods inherited from class org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction
checkBlock, localClusterStateOperationMethods inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
doExecuteMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Constructor Details
-
TransportGetAllSampleConfigurationAction
@Inject public TransportGetAllSampleConfigurationAction(ActionFilters actionFilters, TransportService transportService, ClusterService clusterService, ProjectResolver projectResolver) Constructs a new TransportGetAllSampleConfigurationAction.- Parameters:
actionFilters- the action filters to applytransportService- the transport serviceclusterService- the cluster serviceprojectResolver- the project resolver
-
-
Method Details
-
localClusterStateOperation
protected void localClusterStateOperation(Task task, GetAllSampleConfigurationAction.Request request, ProjectState state, ActionListener<GetAllSampleConfigurationAction.Response> listener) Executes the get all sampling configuration operation against the local cluster state.Retrieves all sampling configuration from the project metadata. Returns empty map if no sampling metadata exists or if no configurations are set.
- Specified by:
localClusterStateOperationin classTransportLocalProjectMetadataAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response> - Parameters:
task- the task executing this operationrequest- the get sampling configuration request containing the index namestate- the current project statelistener- the listener to notify with the response or failure
-
checkBlock
protected ClusterBlockException checkBlock(GetAllSampleConfigurationAction.Request request, ProjectState state) Checks for cluster blocks that would prevent this operation from executing.- Specified by:
checkBlockin classTransportLocalProjectMetadataAction<GetAllSampleConfigurationAction.Request,GetAllSampleConfigurationAction.Response> - Parameters:
request- the get sampling configuration requeststate- the current project state- Returns:
- a cluster block exception if the operation is blocked, null otherwise
-