public class RepositoriesService extends AbstractComponent implements ClusterStateListener
Modifier and Type | Class and Description |
---|---|
static class |
RepositoriesService.RegisterRepositoryRequest
Register repository request
|
static class |
RepositoriesService.UnregisterRepositoryRequest
Unregister repository request
|
static class |
RepositoriesService.VerifyResponse
Verify repository request
|
deprecationLogger, logger, settings
Constructor and Description |
---|
RepositoriesService(Settings settings,
ClusterService clusterService,
TransportService transportService,
RepositoryTypesRegistry typesRegistry,
Injector injector) |
Modifier and Type | Method and Description |
---|---|
void |
clusterChanged(ClusterChangedEvent event)
Checks if new repositories appeared in or disappeared from cluster metadata and updates current list of
repositories accordingly.
|
IndexShardRepository |
indexShardRepository(String repository)
Returns registered index shard repository
|
void |
registerRepository(RepositoriesService.RegisterRepositoryRequest request,
ActionListener<ClusterStateUpdateResponse> listener)
Registers new repository in the cluster
|
Repository |
repository(String repository)
Returns registered repository
|
void |
unregisterRepository(RepositoriesService.UnregisterRepositoryRequest request,
ActionListener<ClusterStateUpdateResponse> listener)
Unregisters repository in the cluster
|
void |
verifyRepository(String repositoryName,
ActionListener<RepositoriesService.VerifyResponse> listener) |
logDeprecatedSetting, logRemovedSetting, nodeName
@Inject public RepositoriesService(Settings settings, ClusterService clusterService, TransportService transportService, RepositoryTypesRegistry typesRegistry, Injector injector)
public void registerRepository(RepositoriesService.RegisterRepositoryRequest request, ActionListener<ClusterStateUpdateResponse> listener)
This method can be only called on the master node. It tries to create a new repository on the master and if it was successful it adds new repository to cluster metadata.
request
- register repository requestlistener
- register repository listenerpublic void unregisterRepository(RepositoriesService.UnregisterRepositoryRequest request, ActionListener<ClusterStateUpdateResponse> listener)
This method can be only called on the master node. It removes repository information from cluster metadata.
request
- unregister repository requestlistener
- unregister repository listenerpublic void verifyRepository(String repositoryName, ActionListener<RepositoriesService.VerifyResponse> listener)
public void clusterChanged(ClusterChangedEvent event)
clusterChanged
in interface ClusterStateListener
event
- cluster changed eventpublic Repository repository(String repository)
This method is called only on the master node
repository
- repository nameRepositoryMissingException
- if repository with such name isn't registeredpublic IndexShardRepository indexShardRepository(String repository)
This method is called only on data nodes
repository
- repository nameRepositoryMissingException
- if repository with such name isn't registeredCopyright © 2009–2017. All rights reserved.