confluent-kafka-dotnet
Show / Hide Table of Contents

Class TopicPartitionTimestamp

Represents a Kafka (topic, partition, timestamp) tuple.

Inheritance
object
TopicPartitionTimestamp
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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
TypeNameDescription
TopicPartitiontp

Kafka topic name and partition.

Timestamptimestamp

A Kafka timestamp value.

TopicPartitionTimestamp(string, Partition, Timestamp)

Initializes a new TopicPartitionTimestamp instance.

Declaration
public TopicPartitionTimestamp(string topic, Partition partition, Timestamp timestamp)
Parameters
TypeNameDescription
stringtopic

A Kafka topic name.

Partitionpartition

A Kafka partition.

Timestamptimestamp

A Kafka timestamp value.

Properties

Partition

Gets the Kafka partition.

Declaration
public Partition Partition { get; }
Property Value
TypeDescription
Partition

Timestamp

Gets the Kafka timestamp.

Declaration
public Timestamp Timestamp { get; }
Property Value
TypeDescription
Timestamp

Topic

Gets the Kafka topic name.

Declaration
public string Topic { get; }
Property Value
TypeDescription
string

TopicPartition

Gets the TopicPartition component of this TopicPartitionTimestamp instance.

Declaration
public TopicPartition TopicPartition { get; }
Property Value
TypeDescription
TopicPartition

Methods

Equals(object)

Tests whether this TopicPartitionTimestamp instance is equal to the specified object.

Declaration
public override bool Equals(object obj)
Parameters
TypeNameDescription
objectobj

The object to test.

Returns
TypeDescription
bool

true if obj is a TopicPartitionTimestamp and all properties are equal. false otherwise.

Overrides
object.Equals(object)

GetHashCode()

Returns a hash code for this TopicPartitionTimestamp.

Declaration
public override int GetHashCode()
Returns
TypeDescription
int

An integer that specifies a hash value for this TopicPartitionTimestamp.

Overrides
object.GetHashCode()

ToString()

Returns a string representation of the TopicPartitionTimestamp object.

Declaration
public override string ToString()
Returns
TypeDescription
string

A string that represents the TopicPartitionTimestamp object.

Overrides
object.ToString()

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
TypeNameDescription
TopicPartitionTimestampa

The first TopicPartitionTimestamp instance to compare.

TopicPartitionTimestampb

The second TopicPartitionTimestamp instance to compare.

Returns
TypeDescription
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
TypeNameDescription
TopicPartitionTimestampa

The first TopicPartitionTimestamp instance to compare.

TopicPartitionTimestampb

The second TopicPartitionTimestamp instance to compare.

Returns
TypeDescription
bool

true if TopicPartitionTimestamp instances a and b are not equal. false otherwise.

In this article