Interface ClusterAware


  • @Deprecated
    public interface ClusterAware
    Deprecated.
    The ClusterAware service interface may be implemented by components interested in being made aware of the cluster state or changes thereof the repository on which Apache Sling primarily depends.

    Upon registration and whenever certain changes in the registered JCR Repository service occurs registered services of this type are made aware of the properties of the repository.

    • Field Detail

    • Method Detail

      • unbindRepository

        void unbindRepository()
        Deprecated.
        Informs the service that no repository is currently bound.

        This method is called upon two occasions:

        • When the service is first registered and no repository is bound
        • When a bound repository is unbound and no replacement is bound
      • bindRepository

        void bindRepository​(String repositoryId,
                            String clusterId,
                            boolean isPrimary)
        Deprecated.
        Informs the service on a bound repository.

        This method is called upon three occasions:

        • When the service is first registered and a repository is bound
        • When an existing bound repository is replaced by another bound repository
        • When a repository is being freshly bound
        • When a bound repository changes its primary/secondary (see isPrimary) state.
        Parameters:
        repositoryId - The ID of the repository node upon which Sling is running. If the repository ID is not available from the repository, this parameter is set to null.
        clusterId - The ID of the cluster upon which Sling is running. If the cluster ID is not available from the repository, this parameter is set to null.
        isPrimary - true if the main repository is operating as the primary node in the cluster. If this parameter is false the node is operating as a secondary node.