Package com.yahoo.vespa.config.protocol
Interface JRTClientConfigRequest
- All Superinterfaces:
JRTConfigRequest
- All Known Implementing Classes:
JRTClientConfigRequestV3
Interface for config requests used by clients.
- Author:
- Ulf Lilleengen
-
Method Summary
Modifier and TypeMethodDescriptionGet config definition content.Gets the config checksums of the config returned by the server.long
Get the generation of the newly provided config.Return the payload in the response given by the server.Get theTrace
given in the response by the server.boolean
Test whether or not the response contains an updated config or not.boolean
Test whether ot not the returned config has an updated generation.boolean
isError()
Test whether or not the returned request is an error.nextRequest
(long timeout) Create a newJRTClientConfigRequest
based on this request based on the same request parameters, but having the timeout changed.boolean
Returns true if this config should only be applied at the last restart, false if it should be applied immediatelyboolean
Validate config response given by the server.Methods inherited from interface com.yahoo.vespa.config.protocol.JRTConfigRequest
errorCode, errorMessage, getClientHostName, getConfigKey, getProtocolVersion, getRequest, getRequestConfigChecksums, getRequestDefMd5, getRequestGeneration, getShortDescription, getTimeout, getVespaVersion, validateParameters
-
Method Details
-
validateResponse
boolean validateResponse()Validate config response given by the server. If none is given, or an error occurred, this should return false.- Returns:
- true if valid response, false if not.
-
hasUpdatedGeneration
boolean hasUpdatedGeneration()Test whether ot not the returned config has an updated generation. This should return false if no response have been given.- Returns:
- true if generation is updated, false if not.
-
getNewPayload
Payload getNewPayload()Return the payload in the response given by the server. The payload will be empty if no response was given.- Returns:
- the config payload.
-
nextRequest
Create a newJRTClientConfigRequest
based on this request based on the same request parameters, but having the timeout changed.- Parameters:
timeout
- server timeout of the new request.- Returns:
- a new
JRTClientConfigRequest
instance.
-
isError
boolean isError()Test whether or not the returned request is an error.- Returns:
- true if error, false if not.
-
getNewGeneration
long getNewGeneration()Get the generation of the newly provided config. If none has been given, 0 should be returned.- Returns:
- the new generation.
-
responseIsApplyOnRestart
boolean responseIsApplyOnRestart()Returns true if this config should only be applied at the last restart, false if it should be applied immediately -
getNewChecksums
PayloadChecksums getNewChecksums()Gets the config checksums of the config returned by the server. Returns an empty string if no response has been returned.- Returns:
- a config checksum.
-
hasUpdatedConfig
boolean hasUpdatedConfig()Test whether or not the response contains an updated config or not. False if no response has been returned.- Returns:
- true if config is updated, false if not.
-
getResponseTrace
Trace getResponseTrace()Get theTrace
given in the response by the server. TheTrace
can be used to add further tracing and later printed to provide useful debug info.- Returns:
- a
Trace
.
-
getDefContent
DefContent getDefContent()Get config definition content.- Returns:
- def as lines.
-