Class DefaultReplicationPolicy

All Implemented Interfaces:
Configurable, ReplicationPolicy
Direct Known Subclasses:

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 Details

  • Constructor Details

    • DefaultReplicationPolicy

      public DefaultReplicationPolicy()
  • Method Details

    • configure

      public void configure​(Map<String,​?> props)
      Description copied from interface: Configurable
      Configure this class with the given key-value pairs
      Specified by:
      configure in interface Configurable
    • formatRemoteTopic

      public String formatRemoteTopic​(String sourceClusterAlias, String topic)
      Description copied from interface: ReplicationPolicy
      How to rename remote topics; generally should be like us-west.topic1.
      Specified by:
      formatRemoteTopic in interface ReplicationPolicy
    • topicSource

      public String topicSource​(String topic)
      Description copied from interface: ReplicationPolicy
      Source cluster alias of given remote topic, e.g. "us-west" for "us-west.topic1". Returns null if not a remote topic.
      Specified by:
      topicSource in interface ReplicationPolicy
    • upstreamTopic

      public String upstreamTopic​(String topic)
      Description copied from interface: ReplicationPolicy
      Name 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:
      upstreamTopic in interface ReplicationPolicy