Skip to content

Commit fdc98fc

Browse files
authored
Renamed task list to task queue (#138)
* Updated protos * renamed task list to task queue
1 parent 15e9801 commit fdc98fc

File tree

69 files changed

+1040
-1017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1040
-1017
lines changed

src/main/java/io/temporal/activity/ActivityOptions.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static final class Builder {
5858

5959
private Duration startToCloseTimeout;
6060

61-
private String taskList;
61+
private String taskQueue;
6262

6363
private RetryOptions retryOptions;
6464

@@ -72,7 +72,7 @@ private Builder(ActivityOptions options) {
7272
if (options == null) {
7373
return;
7474
}
75-
this.taskList = options.taskList;
75+
this.taskQueue = options.taskQueue;
7676
this.heartbeatTimeout = options.heartbeatTimeout;
7777
this.retryOptions = options.retryOptions;
7878
this.contextPropagators = options.contextPropagators;
@@ -84,7 +84,7 @@ private Builder(ActivityOptions options) {
8484

8585
/**
8686
* Overall timeout workflow is willing to wait for activity to complete. It includes time in a
87-
* task list (use {@link #setScheduleToStartTimeout(Duration)} to limit it) plus activity
87+
* task queue (use {@link #setScheduleToStartTimeout(Duration)} to limit it) plus activity
8888
* execution time (use {@link #setStartToCloseTimeout(Duration)} to limit it). Either this
8989
* option or both schedule to start and start to close are required.
9090
*/
@@ -94,7 +94,7 @@ public Builder setScheduleToCloseTimeout(Duration scheduleToCloseTimeout) {
9494
}
9595

9696
/**
97-
* Time activity can stay in task list before it is picked up by a worker. If schedule to close
97+
* Time activity can stay in task queue before it is picked up by a worker. If schedule to close
9898
* is not provided then both this and start to close are required.
9999
*/
100100
public Builder setScheduleToStartTimeout(Duration scheduleToStartTimeout) {
@@ -121,11 +121,11 @@ public Builder setHeartbeatTimeout(Duration heartbeatTimeoutSeconds) {
121121
}
122122

123123
/**
124-
* Task list to use when dispatching activity task to a worker. By default it is the same task
124+
* Task queue to use when dispatching activity task to a worker. By default it is the same task
125125
* list name the workflow was started with.
126126
*/
127-
public Builder setTaskList(String taskList) {
128-
this.taskList = taskList;
127+
public Builder setTaskQueue(String taskQueue) {
128+
this.taskQueue = taskQueue;
129129
return this;
130130
}
131131

@@ -169,7 +169,7 @@ public ActivityOptions build() {
169169
scheduleToCloseTimeout,
170170
scheduleToStartTimeout,
171171
startToCloseTimeout,
172-
taskList,
172+
taskQueue,
173173
retryOptions,
174174
contextPropagators,
175175
cancellationType);
@@ -181,7 +181,7 @@ public ActivityOptions validateAndBuildWithDefaults() {
181181
scheduleToCloseTimeout,
182182
scheduleToStartTimeout,
183183
startToCloseTimeout,
184-
taskList,
184+
taskQueue,
185185
RetryOptions.newBuilder(retryOptions).validateBuildWithDefaults(),
186186
contextPropagators,
187187
cancellationType);
@@ -196,7 +196,7 @@ public ActivityOptions validateAndBuildWithDefaults() {
196196

197197
private final Duration startToCloseTimeout;
198198

199-
private final String taskList;
199+
private final String taskQueue;
200200

201201
private final RetryOptions retryOptions;
202202

@@ -209,7 +209,7 @@ private ActivityOptions(
209209
Duration scheduleToCloseTimeout,
210210
Duration scheduleToStartTimeout,
211211
Duration startToCloseTimeout,
212-
String taskList,
212+
String taskQueue,
213213
RetryOptions retryOptions,
214214
List<ContextPropagator> contextPropagators,
215215
ActivityCancellationType cancellationType) {
@@ -230,7 +230,7 @@ private ActivityOptions(
230230
this.scheduleToStartTimeout = scheduleToStartTimeout;
231231
this.startToCloseTimeout = startToCloseTimeout;
232232
}
233-
this.taskList = taskList;
233+
this.taskQueue = taskQueue;
234234
this.retryOptions = retryOptions;
235235
this.contextPropagators = contextPropagators;
236236
this.cancellationType = cancellationType;
@@ -252,8 +252,8 @@ public Duration getStartToCloseTimeout() {
252252
return startToCloseTimeout;
253253
}
254254

255-
public String getTaskList() {
256-
return taskList;
255+
public String getTaskQueue() {
256+
return taskQueue;
257257
}
258258

259259
public RetryOptions getRetryOptions() {
@@ -282,7 +282,7 @@ public boolean equals(Object o) {
282282
&& Objects.equal(scheduleToCloseTimeout, that.scheduleToCloseTimeout)
283283
&& Objects.equal(scheduleToStartTimeout, that.scheduleToStartTimeout)
284284
&& Objects.equal(startToCloseTimeout, that.startToCloseTimeout)
285-
&& Objects.equal(taskList, that.taskList)
285+
&& Objects.equal(taskQueue, that.taskQueue)
286286
&& Objects.equal(retryOptions, that.retryOptions)
287287
&& Objects.equal(contextPropagators, that.contextPropagators);
288288
}
@@ -294,7 +294,7 @@ public int hashCode() {
294294
scheduleToCloseTimeout,
295295
scheduleToStartTimeout,
296296
startToCloseTimeout,
297-
taskList,
297+
taskQueue,
298298
retryOptions,
299299
contextPropagators,
300300
cancellationType);
@@ -311,8 +311,8 @@ public String toString() {
311311
+ scheduleToStartTimeout
312312
+ ", startToCloseTimeout="
313313
+ startToCloseTimeout
314-
+ ", taskList='"
315-
+ taskList
314+
+ ", taskQueue='"
315+
+ taskQueue
316316
+ '\''
317317
+ ", retryOptions="
318318
+ retryOptions

src/main/java/io/temporal/client/WorkflowOptions.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static WorkflowOptions merge(
6262
.setWorkflowTaskTimeout(o.getWorkflowTaskTimeout())
6363
.setWorkflowRunTimeout(o.getWorkflowRunTimeout())
6464
.setWorkflowExecutionTimeout(o.getWorkflowExecutionTimeout())
65-
.setTaskList(o.getTaskList())
65+
.setTaskQueue(o.getTaskQueue())
6666
.setRetryOptions(RetryOptions.merge(methodRetry, o.getRetryOptions()))
6767
.setCronSchedule(OptionsUtils.merge(cronAnnotation, o.getCronSchedule(), String.class))
6868
.setMemo(o.getMemo())
@@ -83,7 +83,7 @@ public static final class Builder {
8383

8484
private Duration workflowTaskTimeout;
8585

86-
private String taskList;
86+
private String taskQueue;
8787

8888
private RetryOptions retryOptions;
8989

@@ -106,7 +106,7 @@ private Builder(WorkflowOptions options) {
106106
this.workflowTaskTimeout = options.workflowTaskTimeout;
107107
this.workflowRunTimeout = options.workflowRunTimeout;
108108
this.workflowExecutionTimeout = options.workflowExecutionTimeout;
109-
this.taskList = options.taskList;
109+
this.taskQueue = options.taskQueue;
110110
this.retryOptions = options.retryOptions;
111111
this.cronSchedule = options.cronSchedule;
112112
this.memo = options.memo;
@@ -175,11 +175,11 @@ public Builder setWorkflowTaskTimeout(Duration workflowTaskTimeout) {
175175
}
176176

177177
/**
178-
* Task list to use for decision tasks. It should match a task list specified when creating a
178+
* Task queue to use for decision tasks. It should match a task queue specified when creating a
179179
* {@link io.temporal.worker.Worker} that hosts the workflow code.
180180
*/
181-
public Builder setTaskList(String taskList) {
182-
this.taskList = taskList;
181+
public Builder setTaskQueue(String taskQueue) {
182+
this.taskQueue = taskQueue;
183183
return this;
184184
}
185185

@@ -224,7 +224,7 @@ public WorkflowOptions build() {
224224
workflowRunTimeout,
225225
workflowExecutionTimeout,
226226
workflowTaskTimeout,
227-
taskList,
227+
taskQueue,
228228
retryOptions,
229229
cronSchedule,
230230
memo,
@@ -242,7 +242,7 @@ public WorkflowOptions validateBuildWithDefaults() {
242242
workflowRunTimeout,
243243
workflowExecutionTimeout,
244244
workflowTaskTimeout,
245-
taskList,
245+
taskQueue,
246246
retryOptions,
247247
cronSchedule,
248248
memo,
@@ -261,7 +261,7 @@ public WorkflowOptions validateBuildWithDefaults() {
261261

262262
private final Duration workflowTaskTimeout;
263263

264-
private final String taskList;
264+
private final String taskQueue;
265265

266266
private RetryOptions retryOptions;
267267

@@ -279,7 +279,7 @@ private WorkflowOptions(
279279
Duration workflowRunTimeout,
280280
Duration workflowExecutionTimeout,
281281
Duration workflowTaskTimeout,
282-
String taskList,
282+
String taskQueue,
283283
RetryOptions retryOptions,
284284
String cronSchedule,
285285
Map<String, Object> memo,
@@ -290,7 +290,7 @@ private WorkflowOptions(
290290
this.workflowRunTimeout = workflowRunTimeout;
291291
this.workflowExecutionTimeout = workflowExecutionTimeout;
292292
this.workflowTaskTimeout = workflowTaskTimeout;
293-
this.taskList = taskList;
293+
this.taskQueue = taskQueue;
294294
this.retryOptions = retryOptions;
295295
this.cronSchedule = cronSchedule;
296296
this.memo = memo;
@@ -318,8 +318,8 @@ public Duration getWorkflowTaskTimeout() {
318318
return workflowTaskTimeout;
319319
}
320320

321-
public String getTaskList() {
322-
return taskList;
321+
public String getTaskQueue() {
322+
return taskQueue;
323323
}
324324

325325
public RetryOptions getRetryOptions() {
@@ -356,7 +356,7 @@ public boolean equals(Object o) {
356356
&& Objects.equal(workflowRunTimeout, that.workflowRunTimeout)
357357
&& Objects.equal(workflowExecutionTimeout, that.workflowExecutionTimeout)
358358
&& Objects.equal(workflowTaskTimeout, that.workflowTaskTimeout)
359-
&& Objects.equal(taskList, that.taskList)
359+
&& Objects.equal(taskQueue, that.taskQueue)
360360
&& Objects.equal(retryOptions, that.retryOptions)
361361
&& Objects.equal(cronSchedule, that.cronSchedule)
362362
&& Objects.equal(memo, that.memo)
@@ -372,7 +372,7 @@ public int hashCode() {
372372
workflowRunTimeout,
373373
workflowExecutionTimeout,
374374
workflowTaskTimeout,
375-
taskList,
375+
taskQueue,
376376
retryOptions,
377377
cronSchedule,
378378
memo,
@@ -394,8 +394,8 @@ public String toString() {
394394
+ workflowExecutionTimeout
395395
+ ", workflowTaskTimeout="
396396
+ workflowTaskTimeout
397-
+ ", taskList='"
398-
+ taskList
397+
+ ", taskQueue='"
398+
+ taskQueue
399399
+ '\''
400400
+ ", retryOptions="
401401
+ retryOptions

src/main/java/io/temporal/internal/common/InternalUtils.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import io.temporal.common.converter.DataConverter;
2424
import io.temporal.common.v1.Payload;
2525
import io.temporal.common.v1.SearchAttributes;
26-
import io.temporal.enums.v1.TaskListKind;
26+
import io.temporal.enums.v1.TaskQueueKind;
2727
import io.temporal.internal.worker.Shutdownable;
28-
import io.temporal.tasklist.v1.TaskList;
28+
import io.temporal.taskqueue.v1.TaskQueue;
2929
import java.util.HashMap;
3030
import java.util.Map;
3131
import java.util.concurrent.ExecutorService;
@@ -34,17 +34,17 @@
3434
/** Utility functions shared by the implementation code. */
3535
public final class InternalUtils {
3636

37-
public static TaskList createStickyTaskList(String taskListName) {
38-
return TaskList.newBuilder()
39-
.setName(taskListName)
40-
.setKind(TaskListKind.TASK_LIST_KIND_STICKY)
37+
public static TaskQueue createStickyTaskQueue(String taskQueueName) {
38+
return TaskQueue.newBuilder()
39+
.setName(taskQueueName)
40+
.setKind(TaskQueueKind.TASK_QUEUE_KIND_STICKY)
4141
.build();
4242
}
4343

44-
public static TaskList createNormalTaskList(String taskListName) {
45-
return TaskList.newBuilder()
46-
.setName(taskListName)
47-
.setKind(TaskListKind.TASK_LIST_KIND_NORMAL)
44+
public static TaskQueue createNormalTaskQueue(String taskQueueName) {
45+
return TaskQueue.newBuilder()
46+
.setName(taskQueueName)
47+
.setKind(TaskQueueKind.TASK_QUEUE_KIND_NORMAL)
4848
.build();
4949
}
5050

src/main/java/io/temporal/internal/common/StartWorkflowExecutionParameters.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public final class StartWorkflowExecutionParameters {
3939

4040
private WorkflowType workflowType;
4141

42-
private String taskList;
42+
private String taskQueue;
4343

4444
private Optional<Payloads> input;
4545

@@ -147,33 +147,33 @@ public StartWorkflowExecutionParameters withWorkflowIdReusePolicy(
147147
}
148148

149149
/**
150-
* Returns the value of the TaskList property for this object.
150+
* Returns the value of the TaskQueue property for this object.
151151
*
152-
* @return The value of the TaskList property for this object.
152+
* @return The value of the TaskQueue property for this object.
153153
*/
154-
public String getTaskList() {
155-
return taskList;
154+
public String getTaskQueue() {
155+
return taskQueue;
156156
}
157157

158158
/**
159-
* Sets the value of the TaskList property for this object.
159+
* Sets the value of the TaskQueue property for this object.
160160
*
161-
* @param taskList The new value for the TaskList property for this object.
161+
* @param taskQueue The new value for the TaskQueue property for this object.
162162
*/
163-
public void setTaskList(String taskList) {
164-
this.taskList = taskList;
163+
public void setTaskQueue(String taskQueue) {
164+
this.taskQueue = taskQueue;
165165
}
166166

167167
/**
168-
* Sets the value of the TaskList property for this object.
168+
* Sets the value of the TaskQueue property for this object.
169169
*
170170
* <p>Returns a reference to this object so that method calls can be chained together.
171171
*
172-
* @param taskList The new value for the TaskList property for this object.
172+
* @param taskQueue The new value for the TaskQueue property for this object.
173173
* @return A reference to this updated object so that method calls can be chained together.
174174
*/
175-
public StartWorkflowExecutionParameters withTaskList(String taskList) {
176-
this.taskList = taskList;
175+
public StartWorkflowExecutionParameters withTaskQueue(String taskQueue) {
176+
this.taskQueue = taskQueue;
177177
return this;
178178
}
179179

@@ -339,7 +339,7 @@ public static StartWorkflowExecutionParameters fromWorkflowOptions(WorkflowOptio
339339
parameters.setWorkflowExecutionTimeoutSeconds(
340340
roundUpToSeconds(options.getWorkflowExecutionTimeout()));
341341
parameters.setWorkflowTaskTimeoutSeconds(roundUpToSeconds(options.getWorkflowTaskTimeout()));
342-
parameters.setTaskList(options.getTaskList());
342+
parameters.setTaskQueue(options.getTaskQueue());
343343
parameters.setWorkflowIdReusePolicy(options.getWorkflowIdReusePolicy());
344344
RetryOptions retryOptions = options.getRetryOptions();
345345
if (retryOptions != null) {
@@ -374,8 +374,8 @@ public String toString() {
374374
+ '\''
375375
+ ", workflowType="
376376
+ workflowType
377-
+ ", taskList='"
378-
+ taskList
377+
+ ", taskQueue='"
378+
+ taskQueue
379379
+ '\''
380380
+ ", input="
381381
+ input
@@ -410,7 +410,7 @@ public boolean equals(Object o) {
410410
&& workflowTaskTimeoutSeconds == that.workflowTaskTimeoutSeconds
411411
&& Objects.equal(workflowId, that.workflowId)
412412
&& Objects.equal(workflowType, that.workflowType)
413-
&& Objects.equal(taskList, that.taskList)
413+
&& Objects.equal(taskQueue, that.taskQueue)
414414
&& Objects.equal(input, that.input)
415415
&& workflowIdReusePolicy == that.workflowIdReusePolicy
416416
&& Objects.equal(retryParameters, that.retryParameters)
@@ -425,7 +425,7 @@ public int hashCode() {
425425
return Objects.hashCode(
426426
workflowId,
427427
workflowType,
428-
taskList,
428+
taskQueue,
429429
input,
430430
workflowRunTimeoutSeconds,
431431
workflowTaskTimeoutSeconds,

0 commit comments

Comments
 (0)