Class ConfigSet
java.lang.Object
io.confluent.remote.config.poller.kubernetes.ConfigSet
This class is used to parse the ConfigMap returned from the Kubernetes API. The ConfigMap will be parsed into a set of ConfigSetEntries. The client will then use the ConfigSet to find the compatible configuration version for the client's API schema version.
Ensure that we only have atmost one minor versions for a major version. This ensures that we better keep track of configurations and avoid any confusion because we would be sure which higher minor version could be used for a schema version.
-
Method Summary
Modifier and TypeMethodDescriptionboolean<T> Optional<T> getCompatibleConfigVersion(String schemaVersion, Class<T> typeParameterClass) The ConfigMap will hold 1 remote configuration objects for each major API schema version.inthashCode()static ConfigSetparseConfigYaml(String configs) We need to provide this convoluted way of parsing configs returned from the ConfigMap because k8s only allows us to specify ConfigMaps ofMap<String, String>; so we're unable to interpret the yaml directly.
-
Method Details
-
parseConfigYaml
public static ConfigSet parseConfigYaml(String configs) throws com.fasterxml.jackson.core.JsonProcessingException We need to provide this convoluted way of parsing configs returned from the ConfigMap because k8s only allows us to specify ConfigMaps ofMap<String, String>; so we're unable to interpret the yaml directly. We use Jackson to deserialize the set of ConfigSetEntries and pass it to the ConfigSet constructor.- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getCompatibleConfigVersion
public <T> Optional<T> getCompatibleConfigVersion(String schemaVersion, Class<T> typeParameterClass) The ConfigMap will hold 1 remote configuration objects for each major API schema version. The client needs to find the compatible API schema version out of the available configs. -
equals
-
hashCode
public int hashCode()
-