Skip to content

Commit

Permalink
Fixed Javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Feb 17, 2018
1 parent 769dcc3 commit 5742ca8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

/**
* Builder interface that is used to construct a {@link PulsarClient} instance.
*
* @since 2.0.0
*/
public interface ClientBuilder extends Serializable, Cloneable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* {@link ConsumerBuilder} is used to configure and create instances of {@link Consumer}.
*
* @see PulsarClient#newConsumer()
*
* @since 2.0.0
*/
public interface ConsumerBuilder extends Serializable, Cloneable {

Expand All @@ -49,16 +51,29 @@ public interface ConsumerBuilder extends Serializable, Cloneable {
ConsumerBuilder clone();

/**
* Finalize the consumer creation by subscribing to the topic.
* Finalize the {@link Consumer} creation by subscribing to the topic.
*
* <p>
* Subscribing to the c
* If the subscription does not exist, a new subscription will be created and all messages published after the
* creation will be retained until acknowledged, even if the consumer is not connected.
*
* @return
* @return the {@link Consumer} instance
* @throws PulsarClientException
* if the the subscribe operation fails
*/
Consumer subscribe() throws PulsarClientException;

/**
* Finalize the {@link Consumer} creation by subscribing to the topic in asynchronous mode.
*
* <p>
* If the subscription does not exist, a new subscription will be created and all messages published after the
* creation will be retained until acknowledged, even if the consumer is not connected.
*
* @return a future that will yield a {@link Consumer} instance
* @throws PulsarClientException
* if the the subscribe operation fails
*/
CompletableFuture<Consumer> subscribeAsync();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ public interface ProducerBuilder extends Serializable, Cloneable {
* If not assigned, the system will generate a globally unique name which can be access with
* {@link Producer#getProducerName()}.
* <p>
* When specifying a name, it is app to the user to ensure that, for a given topic, the producer name is unique
* across all Pulsar's clusters.
* When specifying a name, it is up to the user to ensure that, for a given topic, the producer name is unique
* across all Pulsar's clusters. Brokers will enforce that only a single producer a given name can be publishing on
* a topic.
*
* @param producerName
* the custom name to use for the producer
* @since 1.20.0
*/
ProducerBuilder producerName(String producerName);

Expand Down Expand Up @@ -184,9 +184,6 @@ public interface ProducerBuilder extends Serializable, Cloneable {
* When enabled default batch delay is set to 10 ms and default batch size is 1000 messages
*
* @see ProducerConfiguration#setBatchingMaxPublishDelay(long, TimeUnit)
* @since 1.0.36 <br>
* Make sure all the consumer applications have been updated to use this client version, before starting to
* batch messages.
*/
ProducerBuilder batchingEnabled(boolean batchMessagesEnabled);

Expand Down Expand Up @@ -224,9 +221,6 @@ public interface ProducerBuilder extends Serializable, Cloneable {
* @see ProducerConfiguration#batchingMaxMessages threshold is reached; all messages will be published as a single
* batch message. The consumer will be delivered individual messages in the batch in the same order they were
* enqueued
* @since 1.0.36 <br>
* Make sure all the consumer applications have been updated to use this client version, before starting to
* batch messages.
* @param batchDelay
* the batch delay
* @param timeUnit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public interface PulsarClient extends Closeable {
* Get a new builder instance that can used to configure and build a {@link PulsarClient} instance.
*
* @return the {@link ClientBuilder}
*
* @since 2.0.0
*/
public static ClientBuilder builder() {
return new ClientBuilderImpl();
Expand Down Expand Up @@ -84,13 +86,17 @@ public static PulsarClient create(String serviceUrl, ClientConfiguration conf) t
*
*
* @return a {@link ProducerBuilder} object to configure and construct the {@link Producer} instance
*
* @since 2.0.0
*/
ProducerBuilder newProducer();

/**
* Create a producer with default for publishing on a specific topic
*
* @return a {@link ProducerBuilder} object to configure and construct the {@link Producer} instance
*
* @since 2.0.0
*/
ConsumerBuilder newConsumer();

Expand All @@ -101,6 +107,8 @@ public static PulsarClient create(String serviceUrl, ClientConfiguration conf) t
* subscription. Reader can only work on non-partitioned topics.
*
* @return a {@link ReaderBuilder} that can be used to configure and construct a {@link Reader} instance
*
* @since 2.0.0
*/
ReaderBuilder newReader();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* {@link ReaderBuilder} is used to configure and create instances of {@link Reader}.
*
* @see PulsarClient#newReader()
*
* @since 2.0.0
*/
public interface ReaderBuilder extends Serializable, Cloneable {

Expand Down Expand Up @@ -110,8 +112,8 @@ public interface ReaderBuilder extends Serializable, Cloneable {
/**
* Sets the ConsumerCryptoFailureAction to the value specified
*
* @param The
* consumer action
* @param action
* The action to take when the decoding fails
*/
ReaderBuilder cryptoFailureAction(ConsumerCryptoFailureAction action);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public ReaderConfiguration setCryptoKeyReader(CryptoKeyReader cryptoKeyReader) {
/**
* Sets the ConsumerCryptoFailureAction to the value specified
*
* @param The
* consumer action
* @param action
* The action to take when the decoding fails
*/
public void setCryptoFailureAction(ConsumerCryptoFailureAction action) {
cryptoFailureAction = action;
Expand Down

0 comments on commit 5742ca8

Please sign in to comment.