Class TransportClearIndicesCacheAction
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.action.support.TransportAction<Request,Response>
-
- org.elasticsearch.action.support.HandledTransportAction<Request,Response>
-
- org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>
-
- org.elasticsearch.action.admin.indices.cache.clear.TransportClearIndicesCacheAction
-
public class TransportClearIndicesCacheAction extends TransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>
Indices clear cache action.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction
TransportBroadcastByNodeAction.AsyncAction, TransportBroadcastByNodeAction.EmptyResult, TransportBroadcastByNodeAction.NodeRequest
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
Fields inherited from class org.elasticsearch.action.support.TransportAction
actionName, indexNameExpressionResolver, taskManager, threadPool
-
-
Constructor Summary
Constructors Constructor Description TransportClearIndicesCacheAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClusterBlockExceptioncheckGlobalBlock(ClusterState state, ClearIndicesCacheRequest request)Executes a global block check before polling the cluster state.protected ClusterBlockExceptioncheckRequestBlock(ClusterState state, ClearIndicesCacheRequest request, java.lang.String[] concreteIndices)Executes a global request-level check before polling the cluster state.protected ClearIndicesCacheResponsenewResponse(ClearIndicesCacheRequest request, int totalShards, int successfulShards, int failedShards, java.util.List<TransportBroadcastByNodeAction.EmptyResult> responses, java.util.List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState)Creates a new response to the underlying request.protected ClearIndicesCacheRequestreadRequestFrom(StreamInput in)Deserialize a request from an input streamprotected TransportBroadcastByNodeAction.EmptyResultreadShardResult(StreamInput in)Deserialize a shard-level result from an input streamprotected TransportBroadcastByNodeAction.EmptyResultshardOperation(ClearIndicesCacheRequest request, ShardRouting shardRouting)Executes the shard-level operation.protected ShardsIteratorshards(ClusterState clusterState, ClearIndicesCacheRequest request, java.lang.String[] concreteIndices)The refresh request works against *all* shards.-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.elasticsearch.action.support.TransportAction
execute, execute, execute, execute
-
Methods inherited from class org.elasticsearch.action.support.broadcast.node.TransportBroadcastByNodeAction
doExecute, doExecute
-
-
-
-
Constructor Detail
-
TransportClearIndicesCacheAction
@Inject public TransportClearIndicesCacheAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, IndicesService indicesService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver)
-
-
Method Detail
-
readShardResult
protected TransportBroadcastByNodeAction.EmptyResult readShardResult(StreamInput in) throws java.io.IOException
Description copied from class:TransportBroadcastByNodeActionDeserialize a shard-level result from an input stream- Specified by:
readShardResultin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
in- input stream- Returns:
- a deserialized shard-level result
- Throws:
java.io.IOException
-
newResponse
protected ClearIndicesCacheResponse newResponse(ClearIndicesCacheRequest request, int totalShards, int successfulShards, int failedShards, java.util.List<TransportBroadcastByNodeAction.EmptyResult> responses, java.util.List<DefaultShardOperationFailedException> shardFailures, ClusterState clusterState)
Description copied from class:TransportBroadcastByNodeActionCreates a new response to the underlying request.- Specified by:
newResponsein classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
request- the underlying requesttotalShards- the total number of shards considered for execution of the operationsuccessfulShards- the total number of shards for which execution of the operation was successfulfailedShards- the total number of shards for which execution of the operation failedresponses- the per-node aggregated shard-level resultsshardFailures- the exceptions corresponding to shard operation failuresclusterState- the cluster state- Returns:
- the response
-
readRequestFrom
protected ClearIndicesCacheRequest readRequestFrom(StreamInput in) throws java.io.IOException
Description copied from class:TransportBroadcastByNodeActionDeserialize a request from an input stream- Specified by:
readRequestFromin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
in- input stream- Returns:
- a de-serialized request
- Throws:
java.io.IOException
-
shardOperation
protected TransportBroadcastByNodeAction.EmptyResult shardOperation(ClearIndicesCacheRequest request, ShardRouting shardRouting)
Description copied from class:TransportBroadcastByNodeActionExecutes the shard-level operation. This method is called once per shard serially on the receiving node.- Specified by:
shardOperationin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
request- the node-level requestshardRouting- the shard on which to execute the operation- Returns:
- the result of the shard-level operation for the shard
-
shards
protected ShardsIterator shards(ClusterState clusterState, ClearIndicesCacheRequest request, java.lang.String[] concreteIndices)
The refresh request works against *all* shards.- Specified by:
shardsin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
clusterState- the cluster staterequest- the underlying requestconcreteIndices- the concrete indices on which to execute the operation- Returns:
- the shards on which to execute the operation
-
checkGlobalBlock
protected ClusterBlockException checkGlobalBlock(ClusterState state, ClearIndicesCacheRequest request)
Description copied from class:TransportBroadcastByNodeActionExecutes a global block check before polling the cluster state.- Specified by:
checkGlobalBlockin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
state- the cluster staterequest- the underlying request- Returns:
- a non-null exception if the operation is blocked
-
checkRequestBlock
protected ClusterBlockException checkRequestBlock(ClusterState state, ClearIndicesCacheRequest request, java.lang.String[] concreteIndices)
Description copied from class:TransportBroadcastByNodeActionExecutes a global request-level check before polling the cluster state.- Specified by:
checkRequestBlockin classTransportBroadcastByNodeAction<ClearIndicesCacheRequest,ClearIndicesCacheResponse,TransportBroadcastByNodeAction.EmptyResult>- Parameters:
state- the cluster staterequest- the underlying requestconcreteIndices- the concrete indices on which to execute the operation- Returns:
- a non-null exception if the operation if blocked
-
-