Package com.google.cloud.pubsublite
Class PartitionLookupUtils
java.lang.Object
com.google.cloud.pubsublite.PartitionLookupUtils
Utilities for looking up information on partitions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intnumPartitions(SubscriptionPath subscription) Look up the number of partitions in the topic associated with a subscription.static intnumPartitions(SubscriptionPath subscription, AdminClient client) Look up the number of partitions in the topic associated with a subscription using the provided AdminClient.static intnumPartitions(TopicPath topic) Look up the number of partitions in a topic.static intnumPartitions(TopicPath topic, AdminClient client) Look up the number of partitions in a topic using the provided AdminClient.
-
Method Details
-
numPartitions
Look up the number of partitions in a topic.- Throws:
com.google.api.gax.rpc.ApiException
-
numPartitions
public static int numPartitions(TopicPath topic, AdminClient client) throws com.google.api.gax.rpc.ApiException Look up the number of partitions in a topic using the provided AdminClient.- Throws:
com.google.api.gax.rpc.ApiException
-
numPartitions
public static int numPartitions(SubscriptionPath subscription) throws com.google.api.gax.rpc.ApiException Look up the number of partitions in the topic associated with a subscription.- Throws:
com.google.api.gax.rpc.ApiException
-
numPartitions
public static int numPartitions(SubscriptionPath subscription, AdminClient client) throws com.google.api.gax.rpc.ApiException Look up the number of partitions in the topic associated with a subscription using the provided AdminClient.- Throws:
com.google.api.gax.rpc.ApiException
-