Class TopicPartitionOffset
Represents a Kafka (topic, partition, offset) tuple.
Inheritance
Inherited Members
Namespace: Confluent.Kafka
Assembly: cs.temp.dll.dll
Syntax
public class TopicPartitionOffset
Constructors
TopicPartitionOffset(TopicPartition, Offset)
Initializes a new TopicPartitionOffset instance.
Declaration
public TopicPartitionOffset(TopicPartition tp, Offset offset)
Parameters
Type | Name | Description |
---|---|---|
TopicPartition | tp | Kafka topic name and partition. |
Offset | offset | A Kafka offset value. |
TopicPartitionOffset(String, Partition, Offset)
Initializes a new TopicPartitionOffset instance.
Declaration
public TopicPartitionOffset(string topic, Partition partition, Offset offset)
Parameters
Type | Name | Description |
---|---|---|
System.String | topic | A Kafka topic name. |
Partition | partition | A Kafka partition. |
Offset | offset | A Kafka offset value. |
Properties
Offset
Gets the Kafka partition offset value.
Declaration
public Offset Offset { get; }
Property Value
Type | Description |
---|---|
Offset |
Partition
Gets the Kafka partition.
Declaration
public Partition Partition { get; }
Property Value
Type | Description |
---|---|
Partition |
Topic
Gets the Kafka topic name.
Declaration
public string Topic { get; }
Property Value
Type | Description |
---|---|
System.String |
TopicPartition
Gets the TopicPartition component of this TopicPartitionOffset instance.
Declaration
public TopicPartition TopicPartition { get; }
Property Value
Type | Description |
---|---|
TopicPartition |
Methods
Equals(Object)
Tests whether this TopicPartitionOffset instance is equal to the specified object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to test. |
Returns
Type | Description |
---|---|
System.Boolean | true if obj is a TopicPartitionOffset and all properties are equal. false otherwise. |
Overrides
GetHashCode()
Returns a hash code for this TopicPartitionOffset.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | An integer that specifies a hash value for this TopicPartitionOffset. |
Overrides
ToString()
Returns a string representation of the TopicPartitionOffset object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the TopicPartitionOffset object. |
Overrides
Operators
Equality(TopicPartitionOffset, TopicPartitionOffset)
Tests whether TopicPartitionOffset instance a is equal to TopicPartitionOffset instance b.
Declaration
public static bool operator ==(TopicPartitionOffset a, TopicPartitionOffset b)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffset | a | The first TopicPartitionOffset instance to compare. |
TopicPartitionOffset | b | The second TopicPartitionOffset instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if TopicPartitionOffset instances a and b are equal. false otherwise. |
Inequality(TopicPartitionOffset, TopicPartitionOffset)
Tests whether TopicPartitionOffset instance a is not equal to TopicPartitionOffset instance b.
Declaration
public static bool operator !=(TopicPartitionOffset a, TopicPartitionOffset b)
Parameters
Type | Name | Description |
---|---|---|
TopicPartitionOffset | a | The first TopicPartitionOffset instance to compare. |
TopicPartitionOffset | b | The second TopicPartitionOffset instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if TopicPartitionOffset instances a and b are not equal. false otherwise. |