Class CommonConfigFragment
java.lang.Object
io.aiven.commons.kafka.config.fragment.ConfigFragment
io.aiven.commons.kafka.config.fragment.CommonConfigFragment
- All Implemented Interfaces:
FragmentDataAccess
The common configuration fragment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSetter to programmatically set values in the configuraiotn. -
Field Summary
Fields inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment
dataAccess -
Constructor Summary
ConstructorsConstructorDescriptionCommonConfigFragment(FragmentDataAccess dataAccess) Create a fragment instance from an AbstractConfig. -
Method Summary
Modifier and TypeMethodDescriptionthe converter used for the key portion of the kafka eventGet the maximum number of tasks.Get the task Id.the converter used for the value portion of the kafka eventstatic CommonConfigFragment.SetterGets a setter for this fragment.static org.apache.kafka.common.config.ConfigDefupdate(org.apache.kafka.common.config.ConfigDef configDef) Update the ConfigDef with the values from the fragment.Methods inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment
getBoolean, getClass, getConfiguredInstance, getInt, getList, getLong, getPassword, getString, has, logDeprecated, logDeprecated, logDeprecated, registerIssue, validate, validate, validationMessage, values
-
Constructor Details
-
CommonConfigFragment
Create a fragment instance from an AbstractConfig.- Parameters:
dataAccess- the FragmentDataAccess to retrieve data from.
-
-
Method Details
-
setter
Gets a setter for this fragment.- Parameters:
data- the data to modify.- Returns:
- The setter.
-
update
public static org.apache.kafka.common.config.ConfigDef update(org.apache.kafka.common.config.ConfigDef configDef) Update the ConfigDef with the values from the fragment.- Parameters:
configDef- the configuraiton def to update.- Returns:
- the updated configuration def.
-
getTaskId
Get the task Id.- Returns:
- the task Id.
-
getMaxTasks
Get the maximum number of tasks.- Returns:
- the maximum number of tasks.
-
getKeyConverter
the converter used for the key portion of the kafka event- Returns:
- the converter used for the key portion of the kafka event
-
getValueConverter
the converter used for the value portion of the kafka event- Returns:
- the converter used for the value portion of the kafka event
-