TopicPartitionOffset
.@Deprecated
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.
This class is also used for deferred seek operations.Modifier and Type | Class and Description |
---|---|
static class |
TopicPartitionInitialOffset.SeekPosition
Deprecated.
Enumeration for "special" seeks.
|
Constructor and Description |
---|
TopicPartitionInitialOffset(java.lang.String topic,
int partition)
Deprecated.
Construct an instance with no initial offset management.
|
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
java.lang.Long initialOffset)
Deprecated.
Construct an instance with the provided initial offset with
isRelativeToCurrent() false. |
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
java.lang.Long initialOffset,
boolean relativeToCurrent)
Deprecated.
Construct an instance with the provided initial offset.
|
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
java.lang.Long offset,
TopicPartitionInitialOffset.SeekPosition position)
Deprecated.
Construct an instance with the provided
TopicPartitionInitialOffset.SeekPosition . |
TopicPartitionInitialOffset(java.lang.String topic,
int partition,
TopicPartitionInitialOffset.SeekPosition position)
Deprecated.
Construct an instance with the provided
TopicPartitionInitialOffset.SeekPosition . |
TopicPartitionInitialOffset(org.apache.kafka.common.TopicPartition topicPartition,
java.lang.Long offset,
TopicPartitionInitialOffset.SeekPosition position)
Deprecated.
Construct an instance with the provided
TopicPartitionInitialOffset.SeekPosition . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Deprecated.
|
static TopicPartitionInitialOffset |
fromTPO(TopicPartitionOffset offset)
Deprecated.
API not intended for use outside of the framework.
|
TopicPartitionInitialOffset.SeekPosition |
getPosition()
Deprecated.
|
int |
hashCode()
Deprecated.
|
java.lang.Long |
initialOffset()
Deprecated.
|
boolean |
isRelativeToCurrent()
Deprecated.
|
int |
partition()
Deprecated.
|
java.lang.String |
topic()
Deprecated.
|
org.apache.kafka.common.TopicPartition |
topicPartition()
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
static TopicPartitionOffset |
toTPO(TopicPartitionInitialOffset offset)
Deprecated.
API not intended for use outside of the framework.
|
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 TopicPartitionInitialOffset(java.lang.String topic, int partition, TopicPartitionInitialOffset.SeekPosition position)
TopicPartitionInitialOffset.SeekPosition
.topic
- the topic.partition
- the partition.position
- TopicPartitionInitialOffset.SeekPosition
.public TopicPartitionInitialOffset(java.lang.String topic, int partition, java.lang.Long offset, @Nullable TopicPartitionInitialOffset.SeekPosition position)
TopicPartitionInitialOffset.SeekPosition
.topic
- the topic.partition
- the partition.offset
- the offset from the seek position.position
- TopicPartitionInitialOffset.SeekPosition
.public TopicPartitionInitialOffset(org.apache.kafka.common.TopicPartition topicPartition, java.lang.Long offset, @Nullable TopicPartitionInitialOffset.SeekPosition position)
TopicPartitionInitialOffset.SeekPosition
.topicPartition
- the topic/partition.offset
- the offset from the seek position (or timestamp for
TopicPartitionInitialOffset.SeekPosition.TIMESTAMP
).position
- TopicPartitionInitialOffset.SeekPosition
.public org.apache.kafka.common.TopicPartition topicPartition()
public int partition()
public java.lang.String topic()
public java.lang.Long initialOffset()
public boolean isRelativeToCurrent()
public TopicPartitionInitialOffset.SeekPosition getPosition()
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
public static TopicPartitionInitialOffset fromTPO(TopicPartitionOffset offset)
offset
- the offset.public static TopicPartitionOffset toTPO(TopicPartitionInitialOffset offset)
offset
- the offset.