crossoverJie commented on PR #21228:
URL: https://github.com/apache/pulsar/pull/21228#issuecomment-1732782087

   > More overloads will be added in this way. I'm wondering if we can just 
pass a `XXXOption` to replace so many parameters?
   
   Good advice, I'll use `GetPartitionedStatsOptions` instead of 
`exclusivePublishers/exclusiveSubscriptions`.
   
   ```java
   @Data
   @Builder
   public class GetPartitionedStatsOptions {
       /**
        * Set to true to get precise backlog, Otherwise get imprecise backlog.
        */
       private final boolean getPreciseBacklog;
   
       /**
        * Whether to get backlog size for each subscription.
        */
       private final boolean subscriptionBacklogSize;
   
       /**
        * Whether to get the earliest time in backlog.
        */
       private final boolean getEarliestTimeInBacklog;
   }
   
   CompletableFuture<PartitionedTopicStats> getPartitionedStatsAsync(
           String topic, boolean perPartition, boolean getPreciseBacklog, 
boolean subscriptionBacklogSize,
           boolean getEarliestTimeInBacklog, GetPartitionedStatsOptions 
getPartitionedStatsOptions);
   ```
   Any other suggestions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to