public class TopicPartitionInitialOffset
extends java.lang.Object
null
- do nothing;0
) - seek to EITHER the absolute offset within the
partition or an offset relative to the current position for this consumer, depending
on isRelativeToCurrent()
.
consumer.seekToEnd() + initialOffset
OR the relative to the
current offset for this consumer (if any), depending on
isRelativeToCurrent()
.start()
ed.Constructor and Description |
---|
TopicPartitionInitialOffset(java.lang.String topic,
int partition)
Construct an instance with no initial offset management.
|
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
java.lang.Long initialOffset)
Construct an instance with the provided initial offset with
isRelativeToCurrent() false. |
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
java.lang.Long initialOffset,
boolean relativeToCurrent)
Construct an instance with the provided initial offset.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.Long |
initialOffset() |
boolean |
isRelativeToCurrent() |
int |
partition() |
java.lang.String |
topic() |
org.apache.kafka.common.TopicPartition |
topicPartition() |
java.lang.String |
toString() |
public TopicPartitionInitialOffset(java.lang.String topic, int partition)
topic
- the topic.partition
- the partition.public TopicPartitionInitialOffset(java.lang.String topic, int partition, java.lang.Long initialOffset)
isRelativeToCurrent()
false.topic
- the topic.partition
- the partition.initialOffset
- the initial offset.TopicPartitionInitialOffset(String, int, Long, boolean)
public TopicPartitionInitialOffset(java.lang.String topic, int partition, java.lang.Long initialOffset, boolean relativeToCurrent)
topic
- the topic.partition
- the partition.initialOffset
- the initial offset.relativeToCurrent
- true for the initial offset to be relative to
the current consumer position, false for a positive initial offset to
be absolute and a negative offset relative to the current end of the
partition.public org.apache.kafka.common.TopicPartition topicPartition()
public int partition()
public java.lang.String topic()
public java.lang.Long initialOffset()
public boolean isRelativeToCurrent()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object