Class RawConfig

java.lang.Object
com.yahoo.config.Node
com.yahoo.config.InnerNode
com.yahoo.config.ConfigInstance
com.yahoo.vespa.config.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
  • Constructor Details

  • Method Details

    • createFromResponseParameters

      public static RawConfig createFromResponseParameters(JRTClientConfigRequest req)
      Creates a new Config from the given request, with the values in the response parameters.
      Parameters:
      req - a JRTClientConfigRequest
    • createFromServerRequest

      public static RawConfig createFromServerRequest(JRTServerConfigRequest req)
      Creates a new Config from the given request, with the values in the response parameters.
      Parameters:
      req - a JRTClientConfigRequest
    • getKey

      public ConfigKey<?> getKey()
    • 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()
    • getVespaVersion

      public Optional<VespaVersion> getVespaVersion()
    • getPayloadChecksums

      public PayloadChecksums getPayloadChecksums()
    • 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()