Skip to content

Commit

Permalink
[ISSUE apache#4101] Fix Javadoc for ClientBuilder.keepAliveInterval
Browse files Browse the repository at this point in the history
Fixes apache#4101 

### Motivation

fix issue

### Modifications

fix keepAliveInterval method java doc
  • Loading branch information
ambition119 authored and sijie committed May 21, 2019
1 parent 25c4dae commit 4d9351d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ ClientBuilder authentication(String authPluginClassName, Map<String, String> aut

/**
* Set the interval between each stat info <i>(default: 60 seconds)</i> Stats will be activated with positive
* statsIntervalSeconds It should be set to at least 1 second
* statsInterval It should be set to at least 1 second
*
* @param statsIntervalSeconds
* @param statsInterval
* the interval between each stat info
* @param unit
* time unit for {@code statsInterval}
Expand Down Expand Up @@ -334,13 +334,13 @@ ClientBuilder authentication(String authPluginClassName, Map<String, String> aut
ClientBuilder maxNumberOfRejectedRequestPerConnection(int maxNumberOfRejectedRequestPerConnection);

/**
* Set keep alive interval in seconds for each client-broker-connection. <i>(default: 30)</i>.
* Set keep alive interval for each client-broker-connection. <i>(default: 30 seconds)</i>.
*
* @param keepAliveIntervalSeconds
* @param unit time unit for {@code statsInterval}
* @param keepAliveInterval
* @param unit the time unit in which the keepAliveInterval is defined
* @return the client builder instance
*/
ClientBuilder keepAliveInterval(int keepAliveIntervalSeconds, TimeUnit unit);
ClientBuilder keepAliveInterval(int keepAliveInterval, TimeUnit unit);

/**
* Set the duration of time to wait for a connection to a broker to be established. If the duration passes without a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ public ClientBuilder maxNumberOfRejectedRequestPerConnection(int maxNumberOfReje
}

@Override
public ClientBuilder keepAliveInterval(int keepAliveIntervalSeconds, TimeUnit unit) {
conf.setKeepAliveIntervalSeconds((int)unit.toSeconds(keepAliveIntervalSeconds));
public ClientBuilder keepAliveInterval(int keepAliveInterval, TimeUnit unit) {
conf.setKeepAliveIntervalSeconds((int)unit.toSeconds(keepAliveInterval));
return this;
}

Expand Down

0 comments on commit 4d9351d

Please sign in to comment.