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