Interface CursorClient
-
- All Superinterfaces:
ApiBackgroundResource,AutoCloseable,com.google.api.gax.core.BackgroundResource
- All Known Implementing Classes:
CursorClientImpl
public interface CursorClient extends ApiBackgroundResource
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.api.core.ApiFuture<Void>commitCursor(SubscriptionPath path, Partition partition, Offset offset)Commit a single cursor.static CursorClientcreate(CursorClientSettings settings)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 interface com.google.cloud.pubsublite.internal.ApiBackgroundResource
close
-
-
-
-
Method Detail
-
create
static CursorClient create(CursorClientSettings settings) throws com.google.api.gax.rpc.ApiException
- Throws:
com.google.api.gax.rpc.ApiException
-
region
CloudRegion region()
The Google Cloud region this client operates on.
-
listPartitionCursors
com.google.api.core.ApiFuture<Map<Partition,Offset>> listPartitionCursors(SubscriptionPath path)
List the cursors for a given subscription.- Parameters:
path- The subscription to list cursors for.- Returns:
- A future holding the map of Partition to Offset of the cursors.
-
commitCursor
com.google.api.core.ApiFuture<Void> commitCursor(SubscriptionPath path, Partition partition, Offset offset)
Commit a single cursor.- 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.
-
-