Class RawConfig


  • public class RawConfig
    extends com.yahoo.config.ConfigInstance
    Encapsulates config, usually associated with a JRTConfigRequest. An instance of this class can represent either a config that is not yet resolved, a successfully resolved config, or an error.
    Author:
    hmusum
    • Method Detail

      • getName

        public String getName()
      • getNamespace

        public String getNamespace()
      • getConfigId

        public String getConfigId()
      • getDefMd5

        public String getDefMd5()
      • getGeneration

        public long getGeneration()
      • setGeneration

        public void setGeneration​(long generation)
      • setApplyOnRestart

        public void setApplyOnRestart​(boolean applyOnRestart)
      • applyOnRestart

        public boolean applyOnRestart()
      • getPayload

        public Payload getPayload()
      • errorCode

        public int errorCode()
      • getDefNamespace

        public String getDefNamespace()
      • hasEqualConfig

        public boolean hasEqualConfig​(JRTServerConfigRequest req)
        Returns true if this config is equal to the config (same payload md5) in the given request.
        Parameters:
        req - the request for which to compare config payload with this config.
        Returns:
        true if this config is equal to the config in the given request.
      • hasNewerGeneration

        public boolean hasNewerGeneration​(JRTServerConfigRequest req)
        Returns true if this config has a more recent generation than the config in the given request.
        Parameters:
        req - the request for which to compare generation with this config.
        Returns:
        true if this config has a more recent generation than the config in the given request.
      • isError

        public boolean isError()
        Convenience method.
        Returns:
        true if errorCode() returns 0, false otherwise.
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.yahoo.config.InnerNode
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.yahoo.config.InnerNode
      • toString

        public String toString()
        Overrides:
        toString in class com.yahoo.config.InnerNode
      • getDefContent

        public List<String> getDefContent()