org.elasticsearch.action.update
Class TransportUpdateAction
java.lang.Object
org.elasticsearch.common.component.AbstractComponent
org.elasticsearch.action.support.TransportAction<Request,Response>
org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
org.elasticsearch.action.update.TransportUpdateAction
public class TransportUpdateAction
- extends TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
Method Summary |
protected ClusterBlockException |
checkGlobalBlock(ClusterState state,
UpdateRequest request)
|
protected ClusterBlockException |
checkRequestBlock(ClusterState state,
UpdateRequest request)
|
protected String |
executor()
|
protected GetResult |
extractGetResult(UpdateRequest request,
long version,
Map<String,Object> source,
XContentType sourceContentType,
BytesReference sourceAsBytes)
|
protected UpdateRequest |
newRequest()
|
protected UpdateResponse |
newResponse()
|
protected boolean |
resolveRequest(ClusterState state,
UpdateRequest request,
ActionListener<UpdateResponse> listener)
Resolves the request, by default, simply setting the concrete index (if its aliased one). |
protected boolean |
retryOnFailure(Throwable e)
|
protected void |
shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener)
|
protected void |
shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener,
int retryCount)
|
protected ShardIterator |
shards(ClusterState clusterState,
UpdateRequest request)
Should return an iterator with a single shard! |
protected String |
transportAction()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransportUpdateAction
@Inject
public TransportUpdateAction(Settings settings,
ThreadPool threadPool,
ClusterService clusterService,
TransportService transportService,
IndicesService indicesService,
TransportIndexAction indexAction,
TransportDeleteAction deleteAction,
ScriptService scriptService)
transportAction
protected String transportAction()
- Specified by:
transportAction
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
executor
protected String executor()
- Specified by:
executor
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
newRequest
protected UpdateRequest newRequest()
- Specified by:
newRequest
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
newResponse
protected UpdateResponse newResponse()
- Specified by:
newResponse
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
checkGlobalBlock
protected ClusterBlockException checkGlobalBlock(ClusterState state,
UpdateRequest request)
- Specified by:
checkGlobalBlock
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
checkRequestBlock
protected ClusterBlockException checkRequestBlock(ClusterState state,
UpdateRequest request)
- Specified by:
checkRequestBlock
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
retryOnFailure
protected boolean retryOnFailure(Throwable e)
- Overrides:
retryOnFailure
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
resolveRequest
protected boolean resolveRequest(ClusterState state,
UpdateRequest request,
ActionListener<UpdateResponse> listener)
- Description copied from class:
TransportInstanceSingleOperationAction
- Resolves the request, by default, simply setting the concrete index (if its aliased one). If the resolve
means a different execution, then return false here to indicate not to continue and execute this request.
- Overrides:
resolveRequest
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
shards
protected ShardIterator shards(ClusterState clusterState,
UpdateRequest request)
throws ElasticSearchException
- Description copied from class:
TransportInstanceSingleOperationAction
- Should return an iterator with a single shard!
- Specified by:
shards
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
- Throws:
ElasticSearchException
shardOperation
protected void shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener)
throws ElasticSearchException
- Specified by:
shardOperation
in class TransportInstanceSingleOperationAction<UpdateRequest,UpdateResponse>
- Throws:
ElasticSearchException
shardOperation
protected void shardOperation(UpdateRequest request,
ActionListener<UpdateResponse> listener,
int retryCount)
throws ElasticSearchException
- Throws:
ElasticSearchException
extractGetResult
@Nullable
protected GetResult extractGetResult(UpdateRequest request,
long version,
Map<String,Object> source,
XContentType sourceContentType,
@Nullable
BytesReference sourceAsBytes)
Copyright © 2009-2012. All Rights Reserved.