Class RepositoriesService

  • All Implemented Interfaces:
    ClusterStateApplier

    public class RepositoriesService
    extends java.lang.Object
    implements ClusterStateApplier
    Service responsible for maintaining and providing access to snapshot repositories on nodes.
    • Method Detail

      • registerRepository

        public void registerRepository​(RepositoriesService.RegisterRepositoryRequest request,
                                       ActionListener<ClusterStateUpdateResponse> listener)
        Registers new repository in the cluster

        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.

        Parameters:
        request - register repository request
        listener - register repository listener
      • applyClusterState

        public void applyClusterState​(ClusterChangedEvent event)
        Checks if new repositories appeared in or disappeared from cluster metadata and updates current list of repositories accordingly.
        Specified by:
        applyClusterState in interface ClusterStateApplier
        Parameters:
        event - cluster changed event
      • repository

        public Repository repository​(java.lang.String repositoryName)
        Returns registered repository

        This method is called only on the master node

        Parameters:
        repositoryName - repository name
        Returns:
        registered repository
        Throws:
        RepositoryMissingException - if repository with such name isn't registered
      • registerInternalRepository

        public void registerInternalRepository​(java.lang.String name,
                                               java.lang.String type)
      • unregisterInternalRepository

        public void unregisterInternalRepository​(java.lang.String name)