public interface AdminClient extends ApiBackgroundResource
| Modifier and Type | Interface and Description |
|---|---|
static class |
AdminClient.BacklogLocation
BacklogLoction refers to a location with respect to the message backlog.
|
| Modifier and Type | Method and Description |
|---|---|
static AdminClient |
create(AdminClientSettings settings) |
default com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription)
Create the provided subscription if it does not yet exist.
|
com.google.api.core.ApiFuture<Subscription> |
createSubscription(Subscription subscription,
AdminClient.BacklogLocation startingOffset)
Create the provided subscription at the given starting offset 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> |
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<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<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.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. |
closestatic AdminClient create(AdminClientSettings settings) throws com.google.api.gax.rpc.ApiException
com.google.api.gax.rpc.ApiExceptionCloudRegion region()
com.google.api.core.ApiFuture<Topic> createTopic(Topic topic)
topic - The topic to create.ApiException or
the topic on success.com.google.api.core.ApiFuture<Topic> getTopic(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the topic on success.com.google.api.core.ApiFuture<Long> getTopicPartitionCount(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the number of topic partitions on success.com.google.api.core.ApiFuture<List<Topic>> listTopics(LocationPath path)
path - The path of the project to list topics for.ApiException or
the list of topic paths on success.com.google.api.core.ApiFuture<Topic> updateTopic(Topic topic, com.google.protobuf.FieldMask mask)
topic.getPath() if it exists.topic - 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_FOUNDcom.google.api.core.ApiFuture<Void> deleteTopic(TopicPath path)
id if it exists.path - 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_FOUNDcom.google.api.core.ApiFuture<List<SubscriptionPath>> listTopicSubscriptions(TopicPath path)
id if it exists.path - The path of the topic to retrieve.ApiException or
the list of subscriptions on success.default com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription)
By default, a new subscription will only receive messages published after the subscription was created.
subscription - The subscription to create.ApiException or
the subscription on success.com.google.api.core.ApiFuture<Subscription> createSubscription(Subscription subscription, AdminClient.BacklogLocation startingOffset)
subscription - The subscription to create.startingOffset - The offset at which the new subscription will start receiving messages.ApiException or
the subscription on success.com.google.api.core.ApiFuture<Subscription> getSubscription(SubscriptionPath path)
id if it exists.path - The path of the subscription to retrieve.ApiException or
the subscription on success.com.google.api.core.ApiFuture<List<Subscription>> listSubscriptions(LocationPath path)
path - The path of the project to list subscriptions for.ApiException or
the list of subscription paths on success.com.google.api.core.ApiFuture<Subscription> updateSubscription(Subscription subscription, com.google.protobuf.FieldMask mask)
subscription.getPath() if it exists.subscription - 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_FOUNDcom.google.api.core.ApiFuture<Void> deleteSubscription(SubscriptionPath path)
id if it exists.path - 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_FOUNDCopyright © 2021 Google LLC. All rights reserved.