Class CursorClientImpl
- java.lang.Object
-
- com.google.cloud.pubsublite.internal.ApiResourceAggregation
-
- com.google.cloud.pubsublite.internal.CursorClientImpl
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource,ApiBackgroundResource,CursorClient,AutoCloseable
public class CursorClientImpl extends ApiResourceAggregation implements CursorClient
-
-
Constructor Summary
Constructors Constructor Description CursorClientImpl(CloudRegion region, CursorServiceClient serviceClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<Void>commitCursor(SubscriptionPath path, Partition partition, Offset offset)Commit a single cursor.com.google.api.core.ApiFuture<Map<Partition,Offset>>listPartitionCursors(SubscriptionPath path)List the cursors for a given subscription.CloudRegionregion()The Google Cloud region this client operates on.-
Methods inherited from class com.google.cloud.pubsublite.internal.ApiResourceAggregation
awaitTermination, close, isShutdown, isTerminated, shutdown, shutdownNow
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.cloud.pubsublite.internal.ApiBackgroundResource
close
-
-
-
-
Constructor Detail
-
CursorClientImpl
public CursorClientImpl(CloudRegion region, CursorServiceClient serviceClient)
-
-
Method Detail
-
region
public CloudRegion region()
Description copied from interface:CursorClientThe Google Cloud region this client operates on.- Specified by:
regionin interfaceCursorClient
-
listPartitionCursors
public com.google.api.core.ApiFuture<Map<Partition,Offset>> listPartitionCursors(SubscriptionPath path)
Description copied from interface:CursorClientList the cursors for a given subscription.- Specified by:
listPartitionCursorsin interfaceCursorClient- Parameters:
path- The subscription to list cursors for.- Returns:
- A future holding the map of Partition to Offset of the cursors.
-
commitCursor
public com.google.api.core.ApiFuture<Void> commitCursor(SubscriptionPath path, Partition partition, Offset offset)
Description copied from interface:CursorClientCommit a single cursor.- Specified by:
commitCursorin interfaceCursorClient- Parameters:
path- The subscription to commit a cursor for.partition- The partition to commit a cursor for.offset- The offset to commit.- Returns:
- A future for the operation's completion.
-
-