@Test(expectedExceptions = IllegalArgumentException.class) public void testProducerBuilderImplWhenSendTimeoutPropertyIsNegative() { producerBuilderImpl.sendTimeout(-1, TimeUnit.SECONDS); }
@Override public ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit) { conf.setSendTimeoutMs(sendTimeout, unit); return this; }
ProducerBuilderImpl implements ProducerBuilder<T> { @Override public ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit) { conf.setSendTimeoutMs(sendTimeout, unit); return this; } }
ProducerBuilderImpl implements ProducerBuilder<T> { @Override public ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit) { conf.setSendTimeoutMs(sendTimeout, unit); return this; } @VisibleForTesting  ProducerBuilderImpl(PulsarClientImpl client, Schema<T> schema); private  ProducerBuilderImpl(PulsarClientImpl client, ProducerConfigurationData conf, Schema<T> schema); }
ProducerBuilderImpl implements ProducerBuilder<T> { @Override public ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit) { conf.setSendTimeoutMs(sendTimeout, unit); return this; } @VisibleForTesting  ProducerBuilderImpl(PulsarClientImpl client, Schema<T> schema); private  ProducerBuilderImpl(PulsarClientImpl client, ProducerConfigurationData conf, Schema<T> schema); ProducerBuilder<T> schema(Schema<T> schema); @Override ProducerBuilder<T> clone(); @Override Producer<T> create(); @Override CompletableFuture<Producer<T>> createAsync(); @Override ProducerBuilder<T> loadConf(Map<String, Object> config); @Override ProducerBuilder<T> topic(String topicName); @Override ProducerBuilder<T> producerName(String producerName); @Override ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit); @Override ProducerBuilder<T> maxPendingMessages(int maxPendingMessages); @Override ProducerBuilder<T> maxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions); @Override ProducerBuilder<T> blockIfQueueFull(boolean blockIfQueueFull); @Override ProducerBuilder<T> messageRoutingMode(@NonNull MessageRoutingMode messageRouteMode); @Override ProducerBuilder<T> compressionType(@NonNull CompressionType compressionType); @Override ProducerBuilder<T> hashingScheme(@NonNull HashingScheme hashingScheme); @Override ProducerBuilder<T> messageRouter(@NonNull MessageRouter messageRouter); @Override ProducerBuilder<T> enableBatching(boolean batchMessagesEnabled); @Override ProducerBuilder<T> enableChunking(boolean chunkingEnabled); @Override ProducerBuilder<T> cryptoKeyReader(@NonNull CryptoKeyReader cryptoKeyReader); @Override ProducerBuilder<T> addEncryptionKey(String key); @Override ProducerBuilder<T> cryptoFailureAction(@NonNull ProducerCryptoFailureAction action); @Override ProducerBuilder<T> batchingMaxPublishDelay(long batchDelay, @NonNull TimeUnit timeUnit); @Override ProducerBuilder<T> roundRobinRouterBatchingPartitionSwitchFrequency(int frequency); @Override ProducerBuilder<T> batchingMaxMessages(int batchMessagesMaxMessagesPerBatch); @Override ProducerBuilder<T> batchingMaxBytes(int batchingMaxBytes); @Override ProducerBuilder<T> batcherBuilder(BatcherBuilder batcherBuilder); @Override ProducerBuilder<T> initialSequenceId(long initialSequenceId); @Override ProducerBuilder<T> property(String key, String value); @Override ProducerBuilder<T> properties(@NonNull Map<String, String> properties); @Override ProducerBuilder<T> intercept(ProducerInterceptor... interceptors); @Override @Deprecated ProducerBuilder<T> intercept(org.apache.pulsar.client.api.ProducerInterceptor<T>... interceptors); @Override ProducerBuilder<T> autoUpdatePartitions(boolean autoUpdate); @Override ProducerBuilder<T> autoUpdatePartitionsInterval(int interval, TimeUnit unit); @Override ProducerBuilder<T> enableMultiSchema(boolean multiSchema); @Override String toString(); }
ProducerBuilderImpl implements ProducerBuilder<T> { @Override public ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit) { conf.setSendTimeoutMs(sendTimeout, unit); return this; } @VisibleForTesting  ProducerBuilderImpl(PulsarClientImpl client, Schema<T> schema); private  ProducerBuilderImpl(PulsarClientImpl client, ProducerConfigurationData conf, Schema<T> schema); ProducerBuilder<T> schema(Schema<T> schema); @Override ProducerBuilder<T> clone(); @Override Producer<T> create(); @Override CompletableFuture<Producer<T>> createAsync(); @Override ProducerBuilder<T> loadConf(Map<String, Object> config); @Override ProducerBuilder<T> topic(String topicName); @Override ProducerBuilder<T> producerName(String producerName); @Override ProducerBuilder<T> sendTimeout(int sendTimeout, @NonNull TimeUnit unit); @Override ProducerBuilder<T> maxPendingMessages(int maxPendingMessages); @Override ProducerBuilder<T> maxPendingMessagesAcrossPartitions(int maxPendingMessagesAcrossPartitions); @Override ProducerBuilder<T> blockIfQueueFull(boolean blockIfQueueFull); @Override ProducerBuilder<T> messageRoutingMode(@NonNull MessageRoutingMode messageRouteMode); @Override ProducerBuilder<T> compressionType(@NonNull CompressionType compressionType); @Override ProducerBuilder<T> hashingScheme(@NonNull HashingScheme hashingScheme); @Override ProducerBuilder<T> messageRouter(@NonNull MessageRouter messageRouter); @Override ProducerBuilder<T> enableBatching(boolean batchMessagesEnabled); @Override ProducerBuilder<T> enableChunking(boolean chunkingEnabled); @Override ProducerBuilder<T> cryptoKeyReader(@NonNull CryptoKeyReader cryptoKeyReader); @Override ProducerBuilder<T> addEncryptionKey(String key); @Override ProducerBuilder<T> cryptoFailureAction(@NonNull ProducerCryptoFailureAction action); @Override ProducerBuilder<T> batchingMaxPublishDelay(long batchDelay, @NonNull TimeUnit timeUnit); @Override ProducerBuilder<T> roundRobinRouterBatchingPartitionSwitchFrequency(int frequency); @Override ProducerBuilder<T> batchingMaxMessages(int batchMessagesMaxMessagesPerBatch); @Override ProducerBuilder<T> batchingMaxBytes(int batchingMaxBytes); @Override ProducerBuilder<T> batcherBuilder(BatcherBuilder batcherBuilder); @Override ProducerBuilder<T> initialSequenceId(long initialSequenceId); @Override ProducerBuilder<T> property(String key, String value); @Override ProducerBuilder<T> properties(@NonNull Map<String, String> properties); @Override ProducerBuilder<T> intercept(ProducerInterceptor... interceptors); @Override @Deprecated ProducerBuilder<T> intercept(org.apache.pulsar.client.api.ProducerInterceptor<T>... interceptors); @Override ProducerBuilder<T> autoUpdatePartitions(boolean autoUpdate); @Override ProducerBuilder<T> autoUpdatePartitionsInterval(int interval, TimeUnit unit); @Override ProducerBuilder<T> enableMultiSchema(boolean multiSchema); @Override String toString();  }