Class ClusterMetadata
- java.lang.Object
-
- org.apache.flink.connector.kafka.dynamic.metadata.ClusterMetadata
-
- All Implemented Interfaces:
Serializable
@Experimental public class ClusterMetadata extends Object implements Serializable
ClusterMetadataprovides readers information about a cluster on what topics to read, how to connect to a cluster, and optional offsets initializers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClusterMetadata(Set<String> topics, Properties properties)Constructs theClusterMetadatawith the required properties.ClusterMetadata(Set<String> topics, Properties properties, OffsetsInitializer startingOffsetsInitializer, OffsetsInitializer stoppingOffsetsInitializer)Constructs theClusterMetadatawith the required properties and offsets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)PropertiesgetProperties()Get the properties.OffsetsInitializergetStartingOffsetsInitializer()Get the starting offsets initializer for the cluster.OffsetsInitializergetStoppingOffsetsInitializer()Get the stopping offsets initializer for the cluster.Set<String>getTopics()Get the topics.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
ClusterMetadata
public ClusterMetadata(Set<String> topics, Properties properties)
Constructs theClusterMetadatawith the required properties.- Parameters:
topics- the topics belonging to a cluster.properties- the properties to access a cluster.
-
ClusterMetadata
public ClusterMetadata(Set<String> topics, Properties properties, @Nullable OffsetsInitializer startingOffsetsInitializer, @Nullable OffsetsInitializer stoppingOffsetsInitializer)
Constructs theClusterMetadatawith the required properties and offsets.- Parameters:
topics- the topics belonging to a cluster.properties- the properties to access a cluster.startingOffsetsInitializer- the starting offsets initializer for the cluster.stoppingOffsetsInitializer- the stopping offsets initializer for the cluster.
-
-
Method Detail
-
getProperties
public Properties getProperties()
Get the properties.- Returns:
- the properties.
-
getStartingOffsetsInitializer
@Nullable public OffsetsInitializer getStartingOffsetsInitializer()
Get the starting offsets initializer for the cluster.- Returns:
- the starting offsets initializer, or null to use the source default.
-
getStoppingOffsetsInitializer
@Nullable public OffsetsInitializer getStoppingOffsetsInitializer()
Get the stopping offsets initializer for the cluster.- Returns:
- the stopping offsets initializer, or null to use the source default.
-
-