Class JRTClientConfigRequestV3

    • Field Detail

      • log

        protected static final java.util.logging.Logger log
      • requestData

        protected final com.yahoo.vespa.config.protocol.SlimeRequestData requestData
      • request

        protected final com.yahoo.jrt.Request request
    • Constructor Detail

      • JRTClientConfigRequestV3

        protected JRTClientConfigRequestV3​(ConfigKey<?> key,
                                           java.lang.String hostname,
                                           DefContent defSchema,
                                           java.lang.String configMd5,
                                           long generation,
                                           long timeout,
                                           Trace trace,
                                           CompressionType compressionType,
                                           java.util.Optional<VespaVersion> vespaVersion)
    • Method Detail

      • encodeAsUtf8String

        protected static java.lang.String encodeAsUtf8String​(com.yahoo.slime.Slime data)
      • getJRTMethodName

        protected java.lang.String getJRTMethodName()
      • checkReturnTypes

        protected boolean checkReturnTypes​(com.yahoo.jrt.Request request)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getClientHostName

        public java.lang.String getClientHostName()
        Description copied from interface: JRTConfigRequest
        Get the host name of the client that is requesting config.
        Specified by:
        getClientHostName in interface JRTConfigRequest
        Returns:
        hostname of the client.
      • getRequest

        public com.yahoo.jrt.Request getRequest()
        Description copied from interface: JRTConfigRequest
        Get the JRT request object for this config request. TODO: This method leaks the internal jrt stuff :(
        Specified by:
        getRequest in interface JRTConfigRequest
        Returns:
        a Request object.
      • errorMessage

        public java.lang.String errorMessage()
        Description copied from interface: JRTConfigRequest
        Return the error message of this request, mostly corresponding to the ErrorCode.
        Specified by:
        errorMessage in interface JRTConfigRequest
        Returns:
        the error message.
      • getShortDescription

        public java.lang.String getShortDescription()
        Description copied from interface: JRTConfigRequest
        Get a short hand description of this request.
        Specified by:
        getShortDescription in interface JRTConfigRequest
        Returns:
        a short description
      • hasUpdatedGeneration

        public boolean hasUpdatedGeneration()
        Description copied from interface: JRTClientConfigRequest
        Test whether ot not the returned config has an updated generation. This should return false if no response have been given.
        Specified by:
        hasUpdatedGeneration in interface JRTClientConfigRequest
        Returns:
        true if generation is updated, false if not.
      • getTimeout

        public long getTimeout()
        Description copied from interface: JRTConfigRequest
        Get the server timeout of this request.
        Specified by:
        getTimeout in interface JRTConfigRequest
        Returns:
        the timeout given to the server
      • newConfMd5

        protected java.lang.String newConfMd5()
      • newGen

        protected long newGen()
      • hasUpdatedConfig

        public boolean hasUpdatedConfig()
        Description copied from interface: JRTClientConfigRequest
        Test whether or not the response contains an updated config or not. False if no response has been returned.
        Specified by:
        hasUpdatedConfig in interface JRTClientConfigRequest
        Returns:
        true if config is updated, false if not.
      • getRequestConfigMd5

        public java.lang.String getRequestConfigMd5()
        Description copied from interface: JRTConfigRequest
        Get the config md5 of the config request. Return an empty string if no response has been returned.
        Specified by:
        getRequestConfigMd5 in interface JRTConfigRequest
        Returns:
        a config md5.
      • validateResponse

        public boolean validateResponse()
        Description copied from interface: JRTClientConfigRequest
        Validate config response given by the server. If none is given, or an error occurred, this should return false.
        Specified by:
        validateResponse in interface JRTClientConfigRequest
        Returns:
        true if valid response, false if not.
      • validateParameters

        public boolean validateParameters()
        Description copied from interface: JRTConfigRequest
        Perform request parameter validation of this config request. This method should be called before fetching any kind of config protocol-specific parameter.
        Specified by:
        validateParameters in interface JRTConfigRequest
        Returns:
        true if valid, false if not.
      • getNewConfigMd5

        public java.lang.String getNewConfigMd5()
        Description copied from interface: JRTClientConfigRequest
        Get the config md5 of the config returned by the server. Return an empty string if no response has been returned.
        Specified by:
        getNewConfigMd5 in interface JRTClientConfigRequest
        Returns:
        a config md5.
      • getNewGeneration

        public long getNewGeneration()
        Description copied from interface: JRTClientConfigRequest
        Get the generation of the newly provided config. If none has been given, 0 should be returned.
        Specified by:
        getNewGeneration in interface JRTClientConfigRequest
        Returns:
        the new generation.
      • getRequestGeneration

        public long getRequestGeneration()
        Description copied from interface: JRTConfigRequest
        Get the generation of the requested config. If none has been given, 0 should be returned.
        Specified by:
        getRequestGeneration in interface JRTConfigRequest
        Returns:
        the generation in the request.
      • getResponseData

        protected com.yahoo.vespa.config.protocol.SlimeResponseData getResponseData()