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, 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, Class<C> configClass)
      Clears the configuration of the given class for the specified subject.
      <S> void clearQueuedConfig​(S subject, String configKey)
      Clears the configuration of the given class for the specified subject.
      <S,​C extends Config<S>>
      C
      createConfig​(S subject, Class<C> configClass)
      Creates a new configuration of the given class for the specified subject.
      <S,​C extends Config<S>>
      C
      getConfig​(S subject, Class<C> configClass)
      Get the configuration of the given class and for the specified subject.
      <S> Set<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​(Class<C> configClass)
      Returns the configuration factory for the specified configuration class.
      <S> Set<S> getSubjects​(Class<S> subjectClass)
      Returns set of subjects of the specified class, which have some network configuration associated with them.
      <S,​C extends Config<S>>
      Set<S>
      getSubjects​(Class<S> subjectClass, 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, 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​(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> Set<S> getSubjects​(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>> Set<S> getSubjects​(Class<S> subjectClass,
                                                         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> Set<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,
                                                  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,
                                                     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,
                                                    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:
        IllegalArgumentException - if the supplied JSON node contains invalid data
      • clearConfig

        <S,​C extends Config<S>> void clearConfig​(S subject,
                                                       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,
                             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:
        IllegalArgumentException - if the supplied JSON node contains invalid data
      • clearQueuedConfig

        <S> void clearQueuedConfig​(S subject,
                                   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