Module org.elasticsearch.server
Package org.elasticsearch.repositories
Class RepositoriesService.RegisterRepositoryTask
java.lang.Object
org.elasticsearch.cluster.ClusterStateUpdateTask
org.elasticsearch.cluster.AckedClusterStateUpdateTask
org.elasticsearch.repositories.RepositoriesService.RegisterRepositoryTask
- All Implemented Interfaces:
ClusterStateAckListener
,ClusterStateTaskListener
- Enclosing class:
- RepositoriesService
Task class that extracts the 'execute' part of the functionality for registering
repositories.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRegisterRepositoryTask
(RepositoriesService repositoriesService, PutRepositoryRequest request) Constructor used byReservedRepositoryAction
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ClusterState currentState) Computes the cluster state that results from executing this task on the given state.Methods inherited from class org.elasticsearch.cluster.AckedClusterStateUpdateTask
ackTimeout, mustAck, newResponse, onAckFailure, onAckTimeout, onAllNodesAcked, onFailure
Methods inherited from class org.elasticsearch.cluster.ClusterStateUpdateTask
clusterStateProcessed, priority, timeout
-
Field Details
-
found
protected boolean found -
changed
protected boolean changed
-
-
Constructor Details
-
RegisterRepositoryTask
public RegisterRepositoryTask(RepositoriesService repositoriesService, PutRepositoryRequest request) Constructor used byReservedRepositoryAction
- Parameters:
repositoriesService
-request
-
-
-
Method Details
-
execute
Description copied from class:ClusterStateUpdateTask
Computes the cluster state that results from executing this task on the given state. Returns the *same instance* if no change is required, which is an important and valuable optimisation since it short-circuits the whole publication process and saves a bunch of time and effort.- Specified by:
execute
in classClusterStateUpdateTask
-