Package com.yahoo.vespa.config.protocol
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
errorCode()
Returns the error code of this requestjava.lang.String
errorMessage()
Return the error message of this request, mostly corresponding to theErrorCode
.java.lang.String
getClientHostName()
Returns the host name of the client that is requesting config.ConfigKey<?>
getConfigKey()
Returns the config key of the config request.long
getProtocolVersion()
Returns the config protocol versioncom.yahoo.jrt.Request
getRequest()
Returns the JRT request object for this config request.PayloadChecksums
getRequestConfigChecksums()
Returns the generation of the requested config.java.lang.String
getRequestConfigMd5()
Returns the config md5 of the config request.java.lang.String
getRequestDefMd5()
Returns the md5 of the config definition in the request.long
getRequestGeneration()
Returns the generation of the requested config.java.lang.String
getShortDescription()
Returns a short hand description of this request.long
getTimeout()
Returns the server timeout of this request.java.util.Optional<VespaVersion>
getVespaVersion()
Returns the Vespa version of the client that initiated the requestboolean
validateParameters()
Performs request parameter validation of this config request.
-
-
-
Method Detail
-
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.
-
getRequestConfigMd5
java.lang.String getRequestConfigMd5()
Returns the config md5 of the config request. Return an empty string if no response has been returned.- Returns:
- a config md5.
-
getRequestDefMd5
java.lang.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
java.lang.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
java.lang.String errorMessage()
Return the error message of this request, mostly corresponding to theErrorCode
.- 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
java.lang.String getClientHostName()
Returns the host name of the client that is requesting config.- Returns:
- hostname of the client.
-
getVespaVersion
java.util.Optional<VespaVersion> getVespaVersion()
Returns the Vespa version of the client that initiated the request- Returns:
- Vespa version of the client
-
-