Class SlobrokConfigSubscriber

  • All Implemented Interfaces:
    com.yahoo.config.subscription.ConfigSubscriber.SingleSubscriber<com.yahoo.cloud.config.SlobroksConfig>

    public class SlobrokConfigSubscriber
    extends java.lang.Object
    implements com.yahoo.config.subscription.ConfigSubscriber.SingleSubscriber<com.yahoo.cloud.config.SlobroksConfig>
    This class implements subscription to slobrok config.
    Author:
    Simon Thoresen Hult
    • Constructor Summary

      Constructors 
      Constructor Description
      SlobrokConfigSubscriber​(com.yahoo.cloud.config.SlobroksConfig slobroksConfig)  
      SlobrokConfigSubscriber​(java.lang.String configId)
      Constructs a new config subscriber for a given config id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(com.yahoo.cloud.config.SlobroksConfig config)  
      com.yahoo.jrt.slobrok.api.SlobrokList getSlobroks()
      Returns the current slobroks config as an array of connection spec strings.
      void shutdown()
      Shuts down the config subscription by unsubscribing to the slobroks config.
      • Methods inherited from class java.lang.Object

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

      • SlobrokConfigSubscriber

        public SlobrokConfigSubscriber​(java.lang.String configId)
        Constructs a new config subscriber for a given config id.
        Parameters:
        configId - The id of the config to subscribe to.
      • SlobrokConfigSubscriber

        public SlobrokConfigSubscriber​(com.yahoo.cloud.config.SlobroksConfig slobroksConfig)
    • Method Detail

      • configure

        public void configure​(com.yahoo.cloud.config.SlobroksConfig config)
        Specified by:
        configure in interface com.yahoo.config.subscription.ConfigSubscriber.SingleSubscriber<com.yahoo.cloud.config.SlobroksConfig>
      • getSlobroks

        public com.yahoo.jrt.slobrok.api.SlobrokList getSlobroks()
        Returns the current slobroks config as an array of connection spec strings.
        Returns:
        The slobroks config.
      • shutdown

        public void shutdown()
        Shuts down the config subscription by unsubscribing to the slobroks config.