Skip to content

Commit 479cf4b

Browse files
authored
WorkerOptions extend javadocs for default values (#1774)
added info about setting to 0 causes using the default value for the following methods: - setMaxConcurrentWorkflowTaskPollers - setWorkflowPollThreadCount (deprecated) - setMaxConcurrentActivityTaskPollers - setActivityPollThreadCount (deprecated)
1 parent c30e07d commit 479cf4b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

temporal-sdk/src/main/java/io/temporal/worker/WorkerOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public Builder setMaxTaskQueueActivitiesPerSecond(double maxTaskQueueActivitiesP
191191
* <p>Due to internal logic where pollers alternate between sticky and non-sticky queues, this
192192
* value cannot be 1 and will be adjusted to 2 if set to that value.
193193
*
194-
* <p>Default is 5.
194+
* <p>Default is 5, which is chosen if set to zero.
195195
*/
196196
public Builder setMaxConcurrentWorkflowTaskPollers(int maxConcurrentWorkflowTaskPollers) {
197197
this.maxConcurrentWorkflowTaskPollers = maxConcurrentWorkflowTaskPollers;
@@ -203,7 +203,7 @@ public Builder setMaxConcurrentWorkflowTaskPollers(int maxConcurrentWorkflowTask
203203
* workflow tasks will be using host local task queue due to caching. So try incrementing {@link
204204
* WorkerFactoryOptions.Builder#setWorkflowHostLocalPollThreadCount(int)} before this one.
205205
*
206-
* <p>Default is 5.
206+
* <p>Default is 5, which is chosen if set to zero.
207207
*
208208
* @deprecated Use {@link #setMaxConcurrentWorkflowTaskPollers}
209209
*/
@@ -217,7 +217,7 @@ public Builder setWorkflowPollThreadCount(int workflowPollThreadCount) {
217217
* worker is not throttled due to `MaxActivitiesPerSecond` or
218218
* `MaxConcurrentActivityExecutionSize` options and still cannot keep up with the request rate.
219219
*
220-
* <p>Default is 5.
220+
* <p>Default is 5, which is chosen if set to zero.
221221
*/
222222
public Builder setMaxConcurrentActivityTaskPollers(int maxConcurrentActivityTaskPollers) {
223223
this.maxConcurrentActivityTaskPollers = maxConcurrentActivityTaskPollers;
@@ -229,7 +229,7 @@ public Builder setMaxConcurrentActivityTaskPollers(int maxConcurrentActivityTask
229229
* worker is not throttled due to `MaxActivitiesPerSecond` or
230230
* `MaxConcurrentActivityExecutionSize` options and still cannot keep up with the request rate.
231231
*
232-
* <p>Default is 5.
232+
* <p>Default is 5, which is chosen if set to zero.
233233
*
234234
* @deprecated Use {@link #setMaxConcurrentActivityTaskPollers}
235235
*/

0 commit comments

Comments
 (0)