Class AdminClientImpl (1.8.0)

public class AdminClientImpl extends ApiResourceAggregation implements AdminClient

Inheritance

java.lang.Object > ApiResourceAggregation > AdminClientImpl

Implements

AdminClient

Constructors

AdminClientImpl(CloudRegion region, AdminServiceClient serviceClient)

public AdminClientImpl(CloudRegion region, AdminServiceClient serviceClient)
Parameters
NameDescription
regionCloudRegion
serviceClientAdminServiceClient

Methods

createReservation(Reservation reservation)

public ApiFuture<Reservation> createReservation(Reservation reservation)

Create the provided reservation if it does not yet exist.

Parameter
NameDescription
reservationReservation
Returns
TypeDescription
ApiFuture<Reservation>

createSubscription(Subscription subscription, BacklogLocation startingOffset)

public ApiFuture<Subscription> createSubscription(Subscription subscription, BacklogLocation startingOffset)

Create the provided subscription at the given starting offset if it does not yet exist.

Parameters
NameDescription
subscriptionSubscription
startingOffsetBacklogLocation
Returns
TypeDescription
ApiFuture<Subscription>

createSubscription(Subscription subscription, SeekTarget target)

public 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.

A seek is initiated if the target location is a publish or event time. If the seek fails, the created subscription is not deleted.

Parameters
NameDescription
subscriptionSubscription
targetSeekTarget
Returns
TypeDescription
ApiFuture<Subscription>

createTopic(Topic topic)

public ApiFuture<Topic> createTopic(Topic topic)

Create the provided topic if it does not yet exist.

Parameter
NameDescription
topicTopic
Returns
TypeDescription
ApiFuture<Topic>

deleteReservation(ReservationPath path)

public ApiFuture<Void> deleteReservation(ReservationPath path)

Delete the reservation with id id if it exists.

Parameter
NameDescription
pathReservationPath
Returns
TypeDescription
ApiFuture<Void>

deleteSubscription(SubscriptionPath path)

public ApiFuture<Void> deleteSubscription(SubscriptionPath path)

Delete the subscription with id id if it exists.

Parameter
NameDescription
pathSubscriptionPath
Returns
TypeDescription
ApiFuture<Void>

deleteTopic(TopicPath path)

public ApiFuture<Void> deleteTopic(TopicPath path)

Delete the topic with id id if it exists.

Parameter
NameDescription
pathTopicPath
Returns
TypeDescription
ApiFuture<Void>

getReservation(ReservationPath path)

public ApiFuture<Reservation> getReservation(ReservationPath path)

Get the reservation with id id if it exists.

Parameter
NameDescription
pathReservationPath
Returns
TypeDescription
ApiFuture<Reservation>

getSubscription(SubscriptionPath path)

public ApiFuture<Subscription> getSubscription(SubscriptionPath path)

Get the subscription with id id if it exists.

Parameter
NameDescription
pathSubscriptionPath
Returns
TypeDescription
ApiFuture<Subscription>

getTopic(TopicPath path)

public ApiFuture<Topic> getTopic(TopicPath path)

Get the topic with id id if it exists.

Parameter
NameDescription
pathTopicPath
Returns
TypeDescription
ApiFuture<Topic>

getTopicPartitionCount(TopicPath path)

public ApiFuture<Long> getTopicPartitionCount(TopicPath path)

Get the partitioning info for the topic with id id if it exists.

Parameter
NameDescription
pathTopicPath
Returns
TypeDescription
ApiFuture<Long>

listReservationTopics(ReservationPath path)

public ApiFuture<List<TopicPath>> listReservationTopics(ReservationPath path)

Get the list of topics for the reservation with id id if it exists.

Parameter
NameDescription
pathReservationPath
Returns
TypeDescription
ApiFuture<List<TopicPath>>

listReservations(LocationPath path)

public ApiFuture<List<Reservation>> listReservations(LocationPath path)

List all reservations for the specified project.

Parameter
NameDescription
pathLocationPath
Returns
TypeDescription
ApiFuture<List<Reservation>>

listSubscriptions(LocationPath path)

public ApiFuture<List<Subscription>> listSubscriptions(LocationPath path)

List all subscriptions for the specified project.

Parameter
NameDescription
pathLocationPath
Returns
TypeDescription
ApiFuture<List<Subscription>>

listTopicSubscriptions(TopicPath path)

public ApiFuture<List<SubscriptionPath>> listTopicSubscriptions(TopicPath path)

Get the list of subscriptions for the topic with id id if it exists.

Parameter
NameDescription
pathTopicPath
Returns
TypeDescription
ApiFuture<List<SubscriptionPath>>

listTopics(LocationPath path)

public ApiFuture<List<Topic>> listTopics(LocationPath path)

List all topics for the specified project.

Parameter
NameDescription
pathLocationPath
Returns
TypeDescription
ApiFuture<List<Topic>>

region()

public CloudRegion region()

The Google Cloud region this client operates on.

Returns
TypeDescription
CloudRegion

seekSubscription(SubscriptionPath path, SeekTarget target)

public 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.

See https://cloud.google.com/pubsub/lite/docs/seek for more information.

Parameters
NameDescription
pathSubscriptionPath
targetSeekTarget
Returns
TypeDescription
OperationFuture<SeekSubscriptionResponse,OperationMetadata>

updateReservation(Reservation reservation, FieldMask mask)

public ApiFuture<Reservation> updateReservation(Reservation reservation, FieldMask mask)

Update the reservation with path reservation.getPath() if it exists.

Parameters
NameDescription
reservationReservation
maskFieldMask
Returns
TypeDescription
ApiFuture<Reservation>

updateSubscription(Subscription subscription, FieldMask mask)

public ApiFuture<Subscription> updateSubscription(Subscription subscription, FieldMask mask)

Update the subscription with path subscription.getPath() if it exists.

Parameters
NameDescription
subscriptionSubscription
maskFieldMask
Returns
TypeDescription
ApiFuture<Subscription>

updateTopic(Topic topic, FieldMask mask)

public ApiFuture<Topic> updateTopic(Topic topic, FieldMask mask)

Update the topic with path topic.getPath() if it exists.

Parameters
NameDescription
topicTopic
maskFieldMask
Returns
TypeDescription
ApiFuture<Topic>