@InterfaceStability.Evolving public class NewMirrorTopic extends Object
Constructor and Description |
---|
NewMirrorTopic(String linkName,
String sourceTopic)
Prepares a new topic that mirrors its data from a source topic, starting from
the earliest available offsets of the partitions.
|
NewMirrorTopic(String linkName,
String sourceTopic,
OffsetSpec startOffsetSpec)
Prepares a new topic that mirrors its data from a source topic, starting from the offsets
determined by the provided
startOffsetSpec . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
linkName()
The name of the cluster link over which the topic will mirror from.
|
String |
mirrorTopic()
Deprecated.
This method is being deprecated because mirrorTopic is not an accurate name to
describe a method that returns the source topic's name.
Use |
String |
sourceTopic()
The name of the topic to be mirrored over the cluster link, i.e.
|
OffsetSpec |
startOffsetSpec() |
String |
toString() |
public NewMirrorTopic(String linkName, String sourceTopic)
linkName
- the name of the cluster link over which the topic will mirror fromsourceTopic
- the name of the topic to be mirrored over the cluster linkpublic NewMirrorTopic(String linkName, String sourceTopic, OffsetSpec startOffsetSpec)
startOffsetSpec
.linkName
- the name of the cluster link over which the topic will mirror fromsourceTopic
- the name of the topic to be mirrored over the cluster linkstartOffsetSpec
- the offset spec used to determine the first offset from which each
partition will be mirrored. By default, mirroring starts from the first
available offset for each source partition. A start offset spec can be
provided to start mirroring from the latest offset or offset with a
specified timestamp.public String linkName()
@Deprecated public String mirrorTopic()
Use sourceTopic()
} instead.
public String sourceTopic()
public OffsetSpec startOffsetSpec()