public class TopicStatsClientImpl extends ApiResourceAggregation implements TopicStatsClient
| Constructor and Description |
|---|
TopicStatsClientImpl(CloudRegion region,
TopicStatsServiceClient serviceClient) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.core.ApiFuture<Optional<Cursor>> |
computeCursorForEventTime(TopicPath path,
Partition partition,
com.google.protobuf.Timestamp eventTime)
Compute the cursor of the first message with event time greater than or equal to the specified
event time, for a topic partition.
|
com.google.api.core.ApiFuture<Optional<Cursor>> |
computeCursorForPublishTime(TopicPath path,
Partition partition,
com.google.protobuf.Timestamp publishTime)
Compute the cursor of the first message with publish time greater than or equal to the
specified publish time, for a topic partition.
|
com.google.api.core.ApiFuture<Cursor> |
computeHeadCursor(TopicPath path,
Partition partition)
Compute the head cursor for the partition.
|
com.google.api.core.ApiFuture<ComputeMessageStatsResponse> |
computeMessageStats(TopicPath path,
Partition partition,
Offset start,
Offset end)
Compute statistics about the messages between two cursors in a topic partition.
|
CloudRegion |
region()
The Google Cloud region this client operates on.
|
awaitTermination, close, isShutdown, isTerminated, shutdown, shutdownNowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateclosepublic TopicStatsClientImpl(CloudRegion region, TopicStatsServiceClient serviceClient)
public CloudRegion region()
TopicStatsClientregion in interface TopicStatsClientpublic com.google.api.core.ApiFuture<ComputeMessageStatsResponse> computeMessageStats(TopicPath path, Partition partition, Offset start, Offset end)
TopicStatsClientcomputeMessageStats in interface TopicStatsClientpath - The topic to compute statistics onpartition - The partition to compute statistics forstart - The start cursorend - The end cursorApiException or the
ComputeMessageStatistics on success.public com.google.api.core.ApiFuture<Cursor> computeHeadCursor(TopicPath path, Partition partition)
TopicStatsClientcomputeHeadCursor in interface TopicStatsClientpath - The topic to compute head cursor onpartition - The partition to compute head cursor forApiException or the head cursor on
success.public com.google.api.core.ApiFuture<Optional<Cursor>> computeCursorForPublishTime(TopicPath path, Partition partition, com.google.protobuf.Timestamp publishTime)
TopicStatsClientIf such a message cannot be found, the returned Optional will be empty.
computeCursorForPublishTime in interface TopicStatsClientpath - The topic to compute cursor forpartition - The partition to compute cursor forpublishTime - The target publish timeApiException, an empty Optional or a
non-null Cursor.public com.google.api.core.ApiFuture<Optional<Cursor>> computeCursorForEventTime(TopicPath path, Partition partition, com.google.protobuf.Timestamp eventTime)
TopicStatsClientIf such a message cannot be found, the returned Optional will be empty.
computeCursorForEventTime in interface TopicStatsClientpath - The topic to compute cursor forpartition - The partition to compute cursor foreventTime - The target event timeApiException, an empty Optional or a
non-null Cursor.Copyright © 2023 Google LLC. All rights reserved.