Package com.yahoo.vespa.config.protocol
Interface JRTClientConfigRequest
-
- All Superinterfaces:
JRTConfigRequest
- All Known Implementing Classes:
JRTClientConfigRequestV3
public interface JRTClientConfigRequest extends JRTConfigRequest
Interface for config requests used by clients.- Author:
- Ulf Lilleengen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DefContent
getDefContent()
Get config definition content.java.lang.String
getNewConfigMd5()
Get the config md5 of the config returned by the server.long
getNewGeneration()
Get the generation of the newly provided config.Payload
getNewPayload()
Return the payload in the response given by the server.Trace
getResponseTrace()
Get theTrace
given in the response by the server.boolean
hasUpdatedConfig()
Test whether or not the response contains an updated config or not.boolean
hasUpdatedGeneration()
Test whether ot not the returned config has an updated generation.boolean
isError()
Test whether or not the returned request is an error.JRTClientConfigRequest
nextRequest(long timeout)
Create a newJRTClientConfigRequest
based on this request based on the same request parameters, but having the timeout changed.boolean
responseIsInternalRedeploy()
Returns whether this config change is due to an internal change not an application package changeboolean
validateResponse()
Validate config response given by the server.-
Methods inherited from interface com.yahoo.vespa.config.protocol.JRTConfigRequest
errorCode, errorMessage, getClientHostName, getConfigKey, getProtocolVersion, getRequest, getRequestConfigMd5, getRequestGeneration, getShortDescription, getTimeout, getVespaVersion, validateParameters
-
-
-
-
Method Detail
-
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
JRTClientConfigRequest nextRequest(long timeout)
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.
-
responseIsInternalRedeploy
boolean responseIsInternalRedeploy()
Returns whether this config change is due to an internal change not an application package change
-
getNewConfigMd5
java.lang.String getNewConfigMd5()
Get the config md5 of the config returned by the server. Return an empty string if no response has been returned.- Returns:
- a config md5.
-
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.
-
-