Interface JRTConfigRequest

All Known Subinterfaces:
JRTClientConfigRequest, JRTServerConfigRequest
All Known Implementing Classes:
JRTClientConfigRequestV3, JRTServerConfigRequestV3

public interface JRTConfigRequest
Common interface for jrt config requests available both at server and client.
Author:
Ulf Lilleengen
  • Method Details

    • getConfigKey

      ConfigKey<?> getConfigKey()
      Returns the config key of the config request.
      Returns:
      a ConfigKey.
    • validateParameters

      boolean validateParameters()
      Performs request parameter validation of this config request. This method should be called before fetching any kind of config protocol-specific parameter.
      Returns:
      true if valid, false if not.
    • getRequestDefMd5

      String getRequestDefMd5()
      Returns the md5 of the config definition in the request.
      Returns:
      an md5 of config definition in request.
    • getRequestConfigChecksums

      PayloadChecksums getRequestConfigChecksums()
      Returns the generation of the requested config. If none has been given, 0 should be returned. Returns the checksum of the config request. Return an empty string if no response has been returned.
      Returns:
      a config checksum.
    • getRequestGeneration

      long getRequestGeneration()
      Returns the generation of the requested config. If none has been given, 0 should be returned.
      Returns:
      the generation in the request.
    • getRequest

      com.yahoo.jrt.Request getRequest()
      Returns the JRT request object for this config request. TODO: This method leaks the internal jrt stuff :(
      Returns:
      a Request object.
    • getShortDescription

      String getShortDescription()
      Returns a short hand description of this request.
      Returns:
      a short description
    • errorCode

      int errorCode()
      Returns the error code of this request
      Returns:
      the error code as defined in ErrorCode.
    • errorMessage

      String errorMessage()
      Return the error message of this request, mostly corresponding to the ErrorCode.
      Returns:
      the error message.
    • getTimeout

      long getTimeout()
      Returns the server timeout of this request.
      Returns:
      the timeout given to the server
    • getProtocolVersion

      long getProtocolVersion()
      Returns the config protocol version
      Returns:
      a protocol version number.
    • getClientHostName

      String getClientHostName()
      Returns the host name of the client that is requesting config.
      Returns:
      hostname of the client.
    • getVespaVersion

      Optional<VespaVersion> getVespaVersion()
      Returns the Vespa version of the client that initiated the request
      Returns:
      Vespa version of the client