Interface NetworkConfigStore

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addConfigFactory​(ConfigFactory configFactory)
      Adds a new configuration factory.
      <S,​C extends Config<S>>
      C
      applyConfig​(S subject, java.lang.Class<C> configClass, com.fasterxml.jackson.databind.JsonNode json)
      Applies configuration for the specified subject and configuration class using the raw JSON object.
      <S> void clearConfig()
      Clears the complete configuration including queued.
      <S> void clearConfig​(S subject)
      Clears the configuration based on the subject including queued.
      <S,​C extends Config<S>>
      void
      clearConfig​(S subject, java.lang.Class<C> configClass)
      Clears the configuration of the given class for the specified subject.
      <S> void clearQueuedConfig​(S subject, java.lang.String configKey)
      Clears the configuration of the given class for the specified subject.
      <S,​C extends Config<S>>
      C
      createConfig​(S subject, java.lang.Class<C> configClass)
      Creates a new configuration of the given class for the specified subject.
      <S,​C extends Config<S>>
      C
      getConfig​(S subject, java.lang.Class<C> configClass)
      Get the configuration of the given class and for the specified subject.
      <S> java.util.Set<java.lang.Class<? extends Config<S>>> getConfigClasses​(S subject)
      Returns set of configuration classes available for the specified subject.
      <S,​C extends Config<S>>
      ConfigFactory<S,​C>
      getConfigFactory​(java.lang.Class<C> configClass)
      Returns the configuration factory for the specified configuration class.
      <S> java.util.Set<S> getSubjects​(java.lang.Class<S> subjectClass)
      Returns set of subjects of the specified class, which have some network configuration associated with them.
      <S,​C extends Config<S>>
      java.util.Set<S>
      getSubjects​(java.lang.Class<S> subjectClass, java.lang.Class<C> configClass)
      Returns set of subjects of the specified class, which have the specified class of network configuration associated with them.
      <S> void queueConfig​(S subject, java.lang.String configKey, com.fasterxml.jackson.databind.JsonNode json)
      Queues pending configuration for the specified subject and configuration class using the raw JSON object.
      void removeConfigFactory​(ConfigFactory configFactory)
      Removes a configuration factory.
    • Method Detail

      • addConfigFactory

        void addConfigFactory​(ConfigFactory configFactory)
        Adds a new configuration factory.
        Parameters:
        configFactory - configuration factory to add
      • removeConfigFactory

        void removeConfigFactory​(ConfigFactory configFactory)
        Removes a configuration factory.
        Parameters:
        configFactory - configuration factory to remove
      • getConfigFactory

        <S,​C extends Config<S>> ConfigFactory<S,​C> getConfigFactory​(java.lang.Class<C> configClass)
        Returns the configuration factory for the specified configuration class.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        configClass - configuration class
        Returns:
        configuration factory or null
      • getSubjects

        <S> java.util.Set<S> getSubjects​(java.lang.Class<S> subjectClass)
        Returns set of subjects of the specified class, which have some network configuration associated with them.
        Type Parameters:
        S - type of subject
        Parameters:
        subjectClass - subject class
        Returns:
        set of subject
      • getSubjects

        <S,​C extends Config<S>> java.util.Set<S> getSubjects​(java.lang.Class<S> subjectClass,
                                                                   java.lang.Class<C> configClass)
        Returns set of subjects of the specified class, which have the specified class of network configuration associated with them.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        subjectClass - subject class
        configClass - configuration class
        Returns:
        set of subject
      • getConfigClasses

        <S> java.util.Set<java.lang.Class<? extends Config<S>>> getConfigClasses​(S subject)
        Returns set of configuration classes available for the specified subject.
        Type Parameters:
        S - type of subject
        Parameters:
        subject - configuration subject
        Returns:
        set of configuration classes
      • getConfig

        <S,​C extends Config<S>> C getConfig​(S subject,
                                                  java.lang.Class<C> configClass)
        Get the configuration of the given class and for the specified subject.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        subject - configuration subject
        configClass - configuration class
        Returns:
        configuration object
      • createConfig

        <S,​C extends Config<S>> C createConfig​(S subject,
                                                     java.lang.Class<C> configClass)
        Creates a new configuration of the given class for the specified subject.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        subject - configuration subject
        configClass - configuration class
        Returns:
        configuration object
      • applyConfig

        <S,​C extends Config<S>> C applyConfig​(S subject,
                                                    java.lang.Class<C> configClass,
                                                    com.fasterxml.jackson.databind.JsonNode json)
        Applies configuration for the specified subject and configuration class using the raw JSON object. If configuration already exists, it will be updated.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        subject - configuration subject
        configClass - configuration class
        json - raw JSON node containing the configuration data
        Returns:
        configuration object
        Throws:
        java.lang.IllegalArgumentException - if the supplied JSON node contains invalid data
      • clearConfig

        <S,​C extends Config<S>> void clearConfig​(S subject,
                                                       java.lang.Class<C> configClass)
        Clears the configuration of the given class for the specified subject.
        Type Parameters:
        S - type of subject
        C - type of configuration
        Parameters:
        subject - configuration subject
        configClass - configuration class
      • queueConfig

        <S> void queueConfig​(S subject,
                             java.lang.String configKey,
                             com.fasterxml.jackson.databind.JsonNode json)
        Queues pending configuration for the specified subject and configuration class using the raw JSON object.
        Type Parameters:
        S - type of subject
        Parameters:
        subject - configuration subject
        configKey - configuration key
        json - raw JSON node containing the configuration data
        Throws:
        java.lang.IllegalArgumentException - if the supplied JSON node contains invalid data
      • clearQueuedConfig

        <S> void clearQueuedConfig​(S subject,
                                   java.lang.String configKey)
        Clears the configuration of the given class for the specified subject.
        Type Parameters:
        S - type of subject
        Parameters:
        subject - configuration subject
        configKey - configuration key
      • clearConfig

        <S> void clearConfig​(S subject)
        Clears the configuration based on the subject including queued. If does not exists this call has no effect.
        Type Parameters:
        S - type of subject
        Parameters:
        subject - configuration subject
      • clearConfig

        <S> void clearConfig()
        Clears the complete configuration including queued. If does not exists this call has no effect.
        Type Parameters:
        S - type of subject