Package io.aiven.commons.kafka.config
Class SinceInfoMapBuilder
java.lang.Object
io.aiven.commons.kafka.config.SinceInfoMapBuilder
Class to build and maintain a list of Override ranges to final version. Items
are retained in the order in which they were added.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe comment character for comment lines in input files. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(org.apache.kafka.common.config.ConfigDef configDef) Applies the mapping to s the final versions for the specified Since values of the ExtendedConfigKeys in the ConfigDef.build()Builds the final map.voidparse(InputStream inputStream) Read the map from an input stream.voidput(SinceInfo.OverrideRange range, SinceInfo.Data data) Put a range and data into the map.voidput(SinceInfo.OverrideRange range, String finalVersion) Put an override range and final version into the map.voidput(String pattern, SinceInfo.Data data) Put an override pattern and the data into the map.voidPut an override pattern and the final version into the map.voidput(String groupId, String artifactId, String version, SinceInfo.Data data) put the range definition and the data into the map.voidPut the override range data and final version into the map.voidserialze(PrintStream printStream) Serialize the map to a print stream.
-
Field Details
-
COMMENT_CHAR
The comment character for comment lines in input files. The comment must be the first character in the line.- See Also:
-
-
Constructor Details
-
SinceInfoMapBuilder
public SinceInfoMapBuilder()Constructs a new SinceInfoMapBuilder.
-
-
Method Details
-
build
Builds the final map.- Returns:
- the override map.
-
put
Put a range and data into the map.- Parameters:
range- the OverrideRange.data- the final version data.
-
put
put the range definition and the data into the map.- Parameters:
groupId- the group ID for the OverrideRange.artifactId- the artifact ID for the OverrideRange.version- the version for the OverrideRange.data- the final version data.
-
put
Put an override pattern and the data into the map.- Parameters:
pattern- a pattern in the form groupId:artifactId:versionRangedata- the final version data.
-
put
Put an override range and final version into the map.- Parameters:
range- the override range.finalVersion- the final version.
-
put
Put the override range data and final version into the map.- Parameters:
groupId- the group ID for the OverrideRange.artifactId- the artifact ID for the OverrideRange.version- the version for the OverrideRange.finalVersion- the final version data.
-
put
Put an override pattern and the final version into the map.- Parameters:
pattern- a pattern in the form groupId:artifactId:versionRangefinalVersion- the final version data.
-
serialze
Serialize the map to a print stream.- Parameters:
printStream- the stream to serialize to.
-
parse
Read the map from an input stream. The stream must comprise lines of text in the form groupId:artifactId:versionRange:finalVersion Parser ignores empty lines and lines starting with '#'- Parameters:
inputStream- the input stream to read from.- Throws:
IOException- on input error or format error.
-
applyTo
public void applyTo(org.apache.kafka.common.config.ConfigDef configDef) Applies the mapping to s the final versions for the specified Since values of the ExtendedConfigKeys in the ConfigDef.- Parameters:
configDef- the configDef to adjust.
-