Class LimitingHeadOffsetReader (1.0.0)

public class LimitingHeadOffsetReader implements PerTopicHeadOffsetReader

Rate limited HeadOffsetReader, utilizing a LoadingCache that refreshes all partitions head offsets for the topic at most once per minute.

Inheritance

java.lang.Object > LimitingHeadOffsetReader

Constructors

LimitingHeadOffsetReader(TopicStatsClient topicStatsClient, TopicPath topic, PartitionCountReader partitionCountReader, Ticker ticker)

public LimitingHeadOffsetReader(TopicStatsClient topicStatsClient, TopicPath topic, PartitionCountReader partitionCountReader, Ticker ticker)
Parameters
NameDescription
topicStatsClientcom.google.cloud.pubsublite.internal.TopicStatsClient
topiccom.google.cloud.pubsublite.TopicPath
partitionCountReaderPartitionCountReader
tickercom.github.benmanes.caffeine.cache.Ticker

Methods

close()

public void close()

getHeadOffset()

public PslSourceOffset getHeadOffset()
Returns
TypeDescription
PslSourceOffset