Package org.apache.kafka.connect.mirror
Class DefaultReplicationPolicy
- java.lang.Object
- 
- org.apache.kafka.connect.mirror.DefaultReplicationPolicy
 
- 
- All Implemented Interfaces:
- Configurable,- ReplicationPolicy
 
 public class DefaultReplicationPolicy extends Object implements ReplicationPolicy, Configurable Defines remote topics like "us-west.topic1". The separator is customizable and defaults to a period.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringSEPARATOR_CONFIGstatic StringSEPARATOR_DEFAULT
 - 
Constructor SummaryConstructors Constructor Description DefaultReplicationPolicy()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Map<String,?> props)Configure this class with the given key-value pairsStringformatRemoteTopic(String sourceClusterAlias, String topic)How to rename remote topics; generally should be like us-west.topic1.StringtopicSource(String topic)Source cluster alias of given remote topic, e.g.StringupstreamTopic(String topic)Name of topic on the source cluster, e.g.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.kafka.connect.mirror.ReplicationPolicyisInternalTopic, originalTopic
 
- 
 
- 
- 
- 
Field Detail- 
SEPARATOR_CONFIGpublic static final String SEPARATOR_CONFIG - See Also:
- Constant Field Values
 
 - 
SEPARATOR_DEFAULTpublic static final String SEPARATOR_DEFAULT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
configurepublic void configure(Map<String,?> props) Description copied from interface:ConfigurableConfigure this class with the given key-value pairs- Specified by:
- configurein interface- Configurable
 
 - 
formatRemoteTopicpublic String formatRemoteTopic(String sourceClusterAlias, String topic) Description copied from interface:ReplicationPolicyHow to rename remote topics; generally should be like us-west.topic1.- Specified by:
- formatRemoteTopicin interface- ReplicationPolicy
 
 - 
topicSourcepublic String topicSource(String topic) Description copied from interface:ReplicationPolicySource cluster alias of given remote topic, e.g. "us-west" for "us-west.topic1". Returns null if not a remote topic.- Specified by:
- topicSourcein interface- ReplicationPolicy
 
 - 
upstreamTopicpublic String upstreamTopic(String topic) Description copied from interface:ReplicationPolicyName of topic on the source cluster, e.g. "topic1" for "us-west.topic1". Topics may be replicated multiple hops, so the immediately upstream topic may itself be a remote topic. Returns null if not a remote topic.- Specified by:
- upstreamTopicin interface- ReplicationPolicy
 
 
- 
 
-