Class RequestConfigResult
java.lang.Object
io.confluent.telemetry.config.remote.polling.RequestConfigResult
Wrapper class that encapsulates the result of requesting remote configuration.
This class allows implementations to distinguish between different types of results
and determine appropriate retry behavior.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanio.confluent.telemetry.config.v2.remote.RemoteConfigurationgetError()inthashCode()booleanisError()booleanbooleanbooleanbooleanbooleanstatic RequestConfigResultnonRetryableError(Exception error) Creates a result indicating a non-retryable error occurred.static RequestConfigResultnotFound()Creates a result indicating that no configuration was found.static RequestConfigResultnoUpdate()Creates a result indicating that the configuration has not changed since the last check.static RequestConfigResultretryableError(Exception error) Creates a result indicating a retryable error occurred.static RequestConfigResultsuccess(io.confluent.telemetry.config.v2.remote.RemoteConfiguration config) Creates a successful result with the retrieved configuration.toString()
-
Method Details
-
success
public static RequestConfigResult success(io.confluent.telemetry.config.v2.remote.RemoteConfiguration config) Creates a successful result with the retrieved configuration.- Parameters:
config- the remote configuration that was successfully retrieved- Returns:
- a RequestConfigResult indicating success
-
noUpdate
Creates a result indicating that the configuration has not changed since the last check.- Returns:
- a RequestConfigResult indicating no update
-
notFound
Creates a result indicating that no configuration was found.- Returns:
- a RequestConfigResult indicating not found
-
retryableError
Creates a result indicating a retryable error occurred.- Parameters:
error- the error that occurred- Returns:
- a RequestConfigResult indicating a retryable error
-
nonRetryableError
Creates a result indicating a non-retryable error occurred.- Parameters:
error- the error that occurred- Returns:
- a RequestConfigResult indicating a non-retryable error
-
getConfig
public io.confluent.telemetry.config.v2.remote.RemoteConfiguration getConfig() -
getError
-
getErrorMessage
-
isSuccess
public boolean isSuccess()- Returns:
- true if this result represents successful configuration retrieval
-
isRetryableError
public boolean isRetryableError()- Returns:
- true if this result represents an error that should trigger retry
-
isNonRetryableError
public boolean isNonRetryableError()- Returns:
- true if this result represents an error that should not trigger retry
-
isError
public boolean isError()- Returns:
- true if this result represents any type of error (retryable or non-retryable)
-
isNoUpdate
public boolean isNoUpdate()- Returns:
- true if this result indicates no update was needed
-
isNotFound
public boolean isNotFound()- Returns:
- true if this result indicates no configuration was found
-
equals
-
hashCode
public int hashCode() -
toString
-