Class LocalTopologyManagerImpl

    • Constructor Detail

      • LocalTopologyManagerImpl

        public LocalTopologyManagerImpl()
    • Method Detail

      • preStart

        public void preStart()
      • start

        public void start()
      • stop

        public void stop()
      • leave

        public void leave​(java.lang.String cacheName,
                          long timeout)
        Description copied from interface: LocalTopologyManager
        Forwards the leave request to the coordinator.
        Specified by:
        leave in interface LocalTopologyManager
      • confirmRebalancePhase

        public void confirmRebalancePhase​(java.lang.String cacheName,
                                          int topologyId,
                                          int rebalanceId,
                                          java.lang.Throwable throwable)
        Description copied from interface: LocalTopologyManager
        Confirm that the local cache cacheName has finished receiving the new data for topology topologyId.

        The coordinator can change during the state transfer, so we make the rebalance RPC async and we send the response as a different command.

        Specified by:
        confirmRebalancePhase in interface LocalTopologyManager
        Parameters:
        cacheName - the name of the cache
        topologyId - the current topology id of the node at the time the rebalance is completed. This must be >= than the one when rebalance starts.
        throwable - null unless local rebalance ended because of an error.
      • handleStableTopologyUpdate

        public void handleStableTopologyUpdate​(java.lang.String cacheName,
                                               CacheTopology newStableTopology,
                                               Address sender,
                                               int viewId)
        Description copied from interface: LocalTopologyManager
        Update the stable cache topology. Mostly needed for backup, so that a new coordinator can recover the stable topology of the cluster.
        Specified by:
        handleStableTopologyUpdate in interface LocalTopologyManager
      • isTotalOrderCache

        public boolean isTotalOrderCache​(java.lang.String cacheName)
        Description copied from interface: LocalTopologyManager
        Checks if the cache defined by cacheName is using total order.

        If this component is not running or the cacheName is not defined, it returns false.

        Specified by:
        isTotalOrderCache in interface LocalTopologyManager
        Returns:
        true if the cache is using the total order protocol, false otherwise.
      • isRebalancingEnabled

        public boolean isRebalancingEnabled()
                                     throws java.lang.Exception
        Description copied from interface: LocalTopologyManager
        Checks whether rebalancing is enabled for the entire cluster.
        Specified by:
        isRebalancingEnabled in interface LocalTopologyManager
        Throws:
        java.lang.Exception
      • setRebalancingEnabled

        public void setRebalancingEnabled​(boolean enabled)
                                   throws java.lang.Exception
        Description copied from interface: LocalTopologyManager
        Enable or disable rebalancing in the entire cluster.
        Specified by:
        setRebalancingEnabled in interface LocalTopologyManager
        Throws:
        java.lang.Exception
      • isCacheRebalancingEnabled

        public boolean isCacheRebalancingEnabled​(java.lang.String cacheName)
                                          throws java.lang.Exception
        Description copied from interface: LocalTopologyManager
        Checks whether rebalancing is enabled for the specified cache.
        Specified by:
        isCacheRebalancingEnabled in interface LocalTopologyManager
        Throws:
        java.lang.Exception
      • executeOnCoordinatorRetry

        public <T> T executeOnCoordinatorRetry​(org.infinispan.commands.ReplicableCommand command,
                                               int viewId)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setCacheRebalancingEnabled

        public void setCacheRebalancingEnabled​(java.lang.String cacheName,
                                               boolean enabled)
                                        throws java.lang.Exception
        Description copied from interface: LocalTopologyManager
        Enable or disable rebalancing for the specified cache.
        Specified by:
        setCacheRebalancingEnabled in interface LocalTopologyManager
        Throws:
        java.lang.Exception
      • getClusterAvailability

        public java.lang.String getClusterAvailability()
      • cacheShutdown

        public void cacheShutdown​(java.lang.String name)
                           throws java.lang.Exception
        Description copied from interface: LocalTopologyManager
        Initiates a cluster-wide cache shutdown for the specified cache
        Specified by:
        cacheShutdown in interface LocalTopologyManager
        Throws:
        java.lang.Exception