Skip to content

Commit

Permalink
tidy comments and fix codestyle violations
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Mar 29, 2023
1 parent 2f15f6e commit 7c42d50
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,35 +227,38 @@ ClientBuilder authentication(String authPluginClassName, Map<String, String> aut
/**
* Set lookup timeout <i>(default: matches operation timeout)</i>
*
* Lookup operations have a different load pattern to other operations. They can be handled by any broker, are not
* proportional to throughput, and are harmless to retry. Given this, it makes sense to allow them to retry longer
* than normal operation, especially if they experience a timeout.
* <p>
* Lookup operations have a different load pattern to other operations.
* They can be handled by any broker, are not proportional to throughput,
* and are harmless to retry. Given this, it makes sense to allow them to
* retry longer than normal operation, especially if they experience a timeout.
*
* By default this is set to match operation timeout. This is to maintain legacy behaviour. However, in practice
* it should be set to 5-10x the operation timeout.
* <p>
* By default, this is set to match operation timeout. This is to maintain legacy behaviour.
* However, in practice it should be set to 5-10x the operation timeout.
*
* @param lookupTimeout
* lookup timeout
* @param unit
* time unit for {@code lookupTimeout}
* @param lookupTimeout lookup timeout
* @param unit time unit for {@code lookupTimeout}
* @return the client builder instance
*/
ClientBuilder lookupTimeout(int lookupTimeout, TimeUnit unit);

/**
* Set the number of threads to be used for handling connections to brokers <i>(default is Runtime.getRuntime().availableProcessors())</i>.
* Set the number of threads to be used for handling connections to brokers
* <i>(default: Runtime.getRuntime().availableProcessors())</i>.
*
* @param numIoThreads the number of IO threads
* @return the client builder instance
*/
ClientBuilder ioThreads(int numIoThreads);

/**
* Set the number of threads to be used for message listeners <i>(default is Runtime.getRuntime().availableProcessors())</i>.
* Set the number of threads to be used for message listeners
* <i>(default: Runtime.getRuntime().availableProcessors())</i>.
*
* <p>The listener thread pool is shared across all the consumers and readers that are
* using a "listener" model to get messages. For a given consumer, the listener will be
* always invoked from the same thread, to ensure ordering.
* using a "listener" model to get messages. For a given consumer, the listener will
* always be invoked from the same thread, to ensure ordering.
*
* @param numListenerThreads the number of listener threads
* @return the client builder instance
Expand Down

0 comments on commit 7c42d50

Please sign in to comment.