Package com.google.cloud.pubsublite
Class PartitionLookupUtils
- java.lang.Object
-
- com.google.cloud.pubsublite.PartitionLookupUtils
-
public final class PartitionLookupUtils extends Object
Utilities for looking up information on partitions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
numPartitions(SubscriptionPath subscription)
Look up the number of partitions in the topic associated with a subscription.static int
numPartitions(SubscriptionPath subscription, AdminClient client)
Look up the number of partitions in the topic associated with a subscription using the provided AdminClient.static int
numPartitions(TopicPath topic)
Look up the number of partitions in a topic.static int
numPartitions(TopicPath topic, AdminClient client)
Look up the number of partitions in a topic using the provided AdminClient.
-
-
-
Method Detail
-
numPartitions
public static int numPartitions(TopicPath topic) throws com.google.api.gax.rpc.ApiException
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
-
-