public class AdminClientImpl extends ApiResourceAggregation implements AdminClient
| Constructor and Description |
|---|
AdminClientImpl(CloudRegion region,
AdminServiceClient serviceClient) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.core.ApiFuture<Reservation> |
createReservation(Reservation reservation)
Create the provided reservation if it does not yet exist.
|
com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription,
BacklogLocation startingOffset)
Create the provided subscription at the given starting offset if it does not yet exist.
|
com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription,
SeekTarget target)
Create the provided subscription at the given target location within the message backlog, if it
does not yet exist.
|
com.google.api.core.ApiFuture<Topic> |
createTopic(Topic topic)
Create the provided topic if it does not yet exist.
|
com.google.api.core.ApiFuture<Void> |
deleteReservation(ReservationPath path)
Delete the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<Void> |
deleteSubscription(SubscriptionPath path)
Delete the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Void> |
deleteTopic(TopicPath path)
Delete the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Reservation> |
getReservation(ReservationPath path)
Get the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<Subscription> |
getSubscription(SubscriptionPath path)
Get the subscription with id
id if it exists. |
com.google.api.core.ApiFuture<Topic> |
getTopic(TopicPath path)
Get the topic with id
id if it exists. |
com.google.api.core.ApiFuture<Long> |
getTopicPartitionCount(TopicPath path)
Get the partitioning info for the topic with id
id if it exists. |
com.google.api.core.ApiFuture<List<Reservation>> |
listReservations(LocationPath path)
List all reservations for the specified project.
|
com.google.api.core.ApiFuture<List<TopicPath>> |
listReservationTopics(ReservationPath path)
Get the list of topics for the reservation with id
id if it exists. |
com.google.api.core.ApiFuture<List<Subscription>> |
listSubscriptions(LocationPath path)
List all subscriptions for the specified project.
|
com.google.api.core.ApiFuture<List<Topic>> |
listTopics(LocationPath path)
List all topics for the specified project.
|
com.google.api.core.ApiFuture<List<SubscriptionPath>> |
listTopicSubscriptions(TopicPath path)
Get the list of subscriptions for the topic with id
id if it exists. |
CloudRegion |
region()
The Google Cloud region this client operates on.
|
com.google.api.gax.longrunning.OperationFuture<SeekSubscriptionResponse,OperationMetadata> |
seekSubscription(SubscriptionPath path,
SeekTarget target)
Initiate an out-of-band seek for a subscription to a specified target, which may be timestamps
or named positions within the message backlog.
|
com.google.api.core.ApiFuture<Reservation> |
updateReservation(Reservation reservation,
com.google.protobuf.FieldMask mask)
Update the reservation with path
reservation.getPath() if it exists. |
com.google.api.core.ApiFuture<Subscription> |
updateSubscription(Subscription subscription,
com.google.protobuf.FieldMask mask)
Update the subscription with path
subscription.getPath() if it exists. |
com.google.api.core.ApiFuture<Topic> |
updateTopic(Topic topic,
com.google.protobuf.FieldMask mask)
Update the topic with path
topic.getPath() if it exists. |
awaitTermination, close, isShutdown, isTerminated, shutdown, shutdownNowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createSubscriptionclosepublic AdminClientImpl(CloudRegion region, AdminServiceClient serviceClient)
public CloudRegion region()
AdminClientregion in interface AdminClientpublic com.google.api.core.ApiFuture<Topic> createTopic(Topic topic)
AdminClientcreateTopic in interface AdminClienttopic - The topic to create.ApiException or
the topic on success.public com.google.api.core.ApiFuture<Topic> getTopic(TopicPath path)
AdminClientid if it exists.getTopic in interface AdminClientpath - The path of the topic to retrieve.ApiException or
the topic on success.public com.google.api.core.ApiFuture<Long> getTopicPartitionCount(TopicPath path)
AdminClientid if it exists.getTopicPartitionCount in interface AdminClientpath - The path of the topic to retrieve.ApiException or
the number of topic partitions on success.public com.google.api.core.ApiFuture<List<Topic>> listTopics(LocationPath path)
AdminClientlistTopics in interface AdminClientpath - The path of the project to list topics for.ApiException or
the list of topic paths on success.public com.google.api.core.ApiFuture<Topic> updateTopic(Topic topic, com.google.protobuf.FieldMask mask)
AdminClienttopic.getPath() if it exists.updateTopic in interface AdminClienttopic - The topic to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting topic on success. Updating nonexistent topics will cause the future to have
an exception with status StatusCode.Code.NOT_FOUNDpublic com.google.api.core.ApiFuture<Void> deleteTopic(TopicPath path)
AdminClientid if it exists.deleteTopic in interface AdminClientpath - The path of the topic to retrieve.ApiException or
void on success. Deleting nonexistent topics will cause the future to have an exception
with status StatusCode.Code.NOT_FOUNDpublic com.google.api.core.ApiFuture<List<SubscriptionPath>> listTopicSubscriptions(TopicPath path)
AdminClientid if it exists.listTopicSubscriptions in interface AdminClientpath - The path of the topic to retrieve.ApiException or
the list of subscriptions on success.public com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription, BacklogLocation startingOffset)
AdminClientcreateSubscription in interface AdminClientsubscription - The subscription to create.startingOffset - The offset at which the new subscription will start receiving messages.ApiException or
the subscription on success.public com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription, SeekTarget target)
AdminClientA seek is initiated if the target location is a publish or event time. If the seek fails, the created subscription is not deleted.
createSubscription in interface AdminClientsubscription - The subscription to create.target - The target location that the subscription should be initialized to.ApiException or
the subscription on success.public com.google.api.core.ApiFuture<Subscription> getSubscription(SubscriptionPath path)
AdminClientid if it exists.getSubscription in interface AdminClientpath - The path of the subscription to retrieve.ApiException or
the subscription on success.public com.google.api.core.ApiFuture<List<Subscription>> listSubscriptions(LocationPath path)
AdminClientlistSubscriptions in interface AdminClientpath - The path of the project to list subscriptions for.ApiException or
the list of subscription paths on success.public com.google.api.core.ApiFuture<Subscription> updateSubscription(Subscription subscription, com.google.protobuf.FieldMask mask)
AdminClientsubscription.getPath() if it exists.updateSubscription in interface AdminClientsubscription - The subscription to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting subscription on success. Updating nonexistent subscriptions will cause the
future to have an exception with status StatusCode.Code.NOT_FOUNDpublic com.google.api.gax.longrunning.OperationFuture<SeekSubscriptionResponse,OperationMetadata> seekSubscription(SubscriptionPath path, SeekTarget target)
AdminClientSee https://cloud.google.com/pubsub/lite/docs/seek for more information.
seekSubscription in interface AdminClientpath - The path of the subscription to seek.target - The location to seek to.OperationFuture that returns an operation name
if the seek was successfully initiated, or otherwise throw an ApiException. com.google.api.gax.longrunning.OperationFuture.get() will return a response if the seek
operation completes successfully, or otherwise throw an ApiException.public com.google.api.core.ApiFuture<Void> deleteSubscription(SubscriptionPath path)
AdminClientid if it exists.deleteSubscription in interface AdminClientpath - The path of the subscription to retrieve.ApiException or
void on success. Deleting nonexistent subscriptions will cause the future to have an
exception with status StatusCode.Code.NOT_FOUNDpublic com.google.api.core.ApiFuture<Reservation> createReservation(Reservation reservation)
AdminClientcreateReservation in interface AdminClientreservation - The reservation to create.ApiException or
the reservation on success.public com.google.api.core.ApiFuture<Reservation> getReservation(ReservationPath path)
AdminClientid if it exists.getReservation in interface AdminClientpath - The path of the reservation to retrieve.ApiException or
the reservation on success.public com.google.api.core.ApiFuture<List<Reservation>> listReservations(LocationPath path)
AdminClientlistReservations in interface AdminClientpath - The path of the project to list reservations for.ApiException or
the list of reservation paths on success.public com.google.api.core.ApiFuture<Reservation> updateReservation(Reservation reservation, com.google.protobuf.FieldMask mask)
AdminClientreservation.getPath() if it exists.updateReservation in interface AdminClientreservation - The reservation to update.mask - The mask indicating which fields should be updated.ApiException or
the resulting reservation on success. Updating nonexistent reservations will cause the
future to have an exception with status StatusCode.Code.NOT_FOUNDpublic com.google.api.core.ApiFuture<Void> deleteReservation(ReservationPath path)
AdminClientid if it exists.deleteReservation in interface AdminClientpath - The path of the reservation to retrieve.ApiException or
void on success. Deleting nonexistent reservations will cause the future to have an
exception with status StatusCode.Code.NOT_FOUNDpublic com.google.api.core.ApiFuture<List<TopicPath>> listReservationTopics(ReservationPath path)
AdminClientid if it exists.listReservationTopics in interface AdminClientpath - The path of the reservation to retrieve.ApiException or
the list of topics on success.Copyright © 2023 Google LLC. All rights reserved.