Class HelixClusterSpectator

  • All Implemented Interfaces:
    com.github.ambry.clustermap.ClusterSpectator, org.apache.helix.api.listeners.InstanceConfigChangeListener, org.apache.helix.api.listeners.LiveInstanceChangeListener

    public class HelixClusterSpectator
    extends java.lang.Object
    implements com.github.ambry.clustermap.ClusterSpectator
    Spectator for vcr helix cluster.
    • Constructor Summary

      Constructors 
      Constructor Description
      HelixClusterSpectator​(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig)
      Constructor for HelixClusterSpectator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onInstanceConfigChange​(java.util.List<org.apache.helix.model.InstanceConfig> instanceConfigs, org.apache.helix.NotificationContext context)  
      void onLiveInstanceChange​(java.util.List<org.apache.helix.model.LiveInstance> liveInstances, org.apache.helix.NotificationContext changeContext)  
      void registerInstanceConfigChangeListener​(org.apache.helix.api.listeners.InstanceConfigChangeListener instanceConfigChangeListener)  
      void registerLiveInstanceChangeListener​(org.apache.helix.api.listeners.LiveInstanceChangeListener liveInstanceChangeListener)  
      void spectate()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HelixClusterSpectator

        public HelixClusterSpectator​(com.github.ambry.config.CloudConfig cloudConfig,
                                     com.github.ambry.config.ClusterMapConfig clusterMapConfig)
        Constructor for HelixClusterSpectator.
        Parameters:
        cloudConfig - Cluster config of vcr.
        clusterMapConfig - Cluster Map config.
    • Method Detail

      • spectate

        public void spectate()
                      throws java.lang.Exception
        Specified by:
        spectate in interface com.github.ambry.clustermap.ClusterSpectator
        Throws:
        java.lang.Exception
      • onInstanceConfigChange

        public void onInstanceConfigChange​(java.util.List<org.apache.helix.model.InstanceConfig> instanceConfigs,
                                           org.apache.helix.NotificationContext context)
        Specified by:
        onInstanceConfigChange in interface org.apache.helix.api.listeners.InstanceConfigChangeListener
      • onLiveInstanceChange

        public void onLiveInstanceChange​(java.util.List<org.apache.helix.model.LiveInstance> liveInstances,
                                         org.apache.helix.NotificationContext changeContext)
        Specified by:
        onLiveInstanceChange in interface org.apache.helix.api.listeners.LiveInstanceChangeListener
      • registerInstanceConfigChangeListener

        public void registerInstanceConfigChangeListener​(org.apache.helix.api.listeners.InstanceConfigChangeListener instanceConfigChangeListener)
        Specified by:
        registerInstanceConfigChangeListener in interface com.github.ambry.clustermap.ClusterSpectator
      • registerLiveInstanceChangeListener

        public void registerLiveInstanceChangeListener​(org.apache.helix.api.listeners.LiveInstanceChangeListener liveInstanceChangeListener)
        Specified by:
        registerLiveInstanceChangeListener in interface com.github.ambry.clustermap.ClusterSpectator