Skip to content

Commit 928b232

Browse files
Merge pull request #391 from andrewjdawson2016/UpThrift
Upgrade thrift
2 parents 05da191 + 618a0de commit 928b232

17 files changed

+80
-171
lines changed

src/main/java/com/uber/cadence/client/WorkflowOptions.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.cronutils.model.definition.CronDefinitionBuilder;
2626
import com.cronutils.parser.CronParser;
2727
import com.google.common.base.Strings;
28-
import com.uber.cadence.ChildPolicy;
2928
import com.uber.cadence.WorkflowIdReusePolicy;
3029
import com.uber.cadence.common.CronSchedule;
3130
import com.uber.cadence.common.MethodRetry;
@@ -60,7 +59,6 @@ public static WorkflowOptions merge(
6059
OptionsUtils.merge(
6160
a.executionStartToCloseTimeoutSeconds(), o.getExecutionStartToCloseTimeout()))
6261
.setTaskList(OptionsUtils.merge(a.taskList(), o.getTaskList(), String.class))
63-
.setChildPolicy(o.getChildPolicy())
6462
.setRetryOptions(RetryOptions.merge(methodRetry, o.getRetryOptions()))
6563
.setCronSchedule(OptionsUtils.merge(cronAnnotation, o.getCronSchedule(), String.class))
6664
.setMemo(o.getMemo())
@@ -80,8 +78,6 @@ public static final class Builder {
8078

8179
private String taskList;
8280

83-
private ChildPolicy childPolicy;
84-
8581
private RetryOptions retryOptions;
8682

8783
private String cronSchedule;
@@ -101,7 +97,6 @@ public Builder(WorkflowOptions o) {
10197
this.taskStartToCloseTimeout = o.taskStartToCloseTimeout;
10298
this.executionStartToCloseTimeout = o.executionStartToCloseTimeout;
10399
this.taskList = o.taskList;
104-
this.childPolicy = o.childPolicy;
105100
this.retryOptions = o.retryOptions;
106101
this.cronSchedule = o.cronSchedule;
107102
this.memo = o.memo;
@@ -174,12 +169,6 @@ public Builder setTaskList(String taskList) {
174169
return this;
175170
}
176171

177-
/** Specifies how children of this workflow react to this workflow death. */
178-
public Builder setChildPolicy(ChildPolicy childPolicy) {
179-
this.childPolicy = childPolicy;
180-
return this;
181-
}
182-
183172
public Builder setRetryOptions(RetryOptions retryOptions) {
184173
this.retryOptions = retryOptions;
185174
return this;
@@ -215,7 +204,6 @@ public WorkflowOptions build() {
215204
executionStartToCloseTimeout,
216205
taskStartToCloseTimeout,
217206
taskList,
218-
childPolicy,
219207
retryOptions,
220208
cronSchedule,
221209
memo,
@@ -262,7 +250,6 @@ public WorkflowOptions validateBuildWithDefaults() {
262250
roundUpToSeconds(
263251
taskStartToCloseTimeout, OptionsUtils.DEFAULT_TASK_START_TO_CLOSE_TIMEOUT),
264252
taskList,
265-
childPolicy,
266253
retryOptions,
267254
cronSchedule,
268255
memo,
@@ -280,8 +267,6 @@ public WorkflowOptions validateBuildWithDefaults() {
280267

281268
private final String taskList;
282269

283-
private final ChildPolicy childPolicy;
284-
285270
private RetryOptions retryOptions;
286271

287272
private String cronSchedule;
@@ -296,7 +281,6 @@ private WorkflowOptions(
296281
Duration executionStartToCloseTimeout,
297282
Duration taskStartToCloseTimeout,
298283
String taskList,
299-
ChildPolicy childPolicy,
300284
RetryOptions retryOptions,
301285
String cronSchedule,
302286
Map<String, Object> memo,
@@ -306,7 +290,6 @@ private WorkflowOptions(
306290
this.executionStartToCloseTimeout = executionStartToCloseTimeout;
307291
this.taskStartToCloseTimeout = taskStartToCloseTimeout;
308292
this.taskList = taskList;
309-
this.childPolicy = childPolicy;
310293
this.retryOptions = retryOptions;
311294
this.cronSchedule = cronSchedule;
312295
this.memo = memo;
@@ -333,10 +316,6 @@ public String getTaskList() {
333316
return taskList;
334317
}
335318

336-
public ChildPolicy getChildPolicy() {
337-
return childPolicy;
338-
}
339-
340319
public RetryOptions getRetryOptions() {
341320
return retryOptions;
342321
}
@@ -363,7 +342,6 @@ public boolean equals(Object o) {
363342
&& Objects.equals(executionStartToCloseTimeout, that.executionStartToCloseTimeout)
364343
&& Objects.equals(taskStartToCloseTimeout, that.taskStartToCloseTimeout)
365344
&& Objects.equals(taskList, that.taskList)
366-
&& childPolicy == that.childPolicy
367345
&& Objects.equals(retryOptions, that.retryOptions)
368346
&& Objects.equals(cronSchedule, that.cronSchedule)
369347
&& Objects.equals(memo, that.memo)
@@ -378,7 +356,6 @@ public int hashCode() {
378356
executionStartToCloseTimeout,
379357
taskStartToCloseTimeout,
380358
taskList,
381-
childPolicy,
382359
retryOptions,
383360
cronSchedule,
384361
memo,
@@ -400,8 +377,6 @@ public String toString() {
400377
+ ", taskList='"
401378
+ taskList
402379
+ '\''
403-
+ ", childPolicy="
404-
+ childPolicy
405380
+ ", retryOptions="
406381
+ retryOptions
407382
+ ", cronSchedule='"

src/main/java/com/uber/cadence/internal/common/StartWorkflowExecutionParameters.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package com.uber.cadence.internal.common;
1919

20-
import com.uber.cadence.ChildPolicy;
2120
import com.uber.cadence.WorkflowIdReusePolicy;
2221
import com.uber.cadence.WorkflowType;
2322
import com.uber.cadence.client.WorkflowOptions;
@@ -43,8 +42,6 @@ public final class StartWorkflowExecutionParameters {
4342

4443
private long taskStartToCloseTimeoutSeconds;
4544

46-
private ChildPolicy childPolicy;
47-
4845
private WorkflowIdReusePolicy workflowIdReusePolicy;
4946

5047
private RetryParameters retryParameters;
@@ -268,19 +265,6 @@ public StartWorkflowExecutionParameters withTaskStartToCloseTimeoutSeconds(
268265
return this;
269266
}
270267

271-
public ChildPolicy getChildPolicy() {
272-
return childPolicy;
273-
}
274-
275-
public void setChildPolicy(ChildPolicy childPolicy) {
276-
this.childPolicy = childPolicy;
277-
}
278-
279-
public StartWorkflowExecutionParameters withChildPolicy(ChildPolicy childPolicy) {
280-
this.childPolicy = childPolicy;
281-
return this;
282-
}
283-
284268
public RetryParameters getRetryParameters() {
285269
return retryParameters;
286270
}
@@ -324,7 +308,6 @@ public static StartWorkflowExecutionParameters fromWorkflowOptions(WorkflowOptio
324308
getSeconds(options.getExecutionStartToCloseTimeout()));
325309
parameters.setTaskStartToCloseTimeoutSeconds(getSeconds(options.getTaskStartToCloseTimeout()));
326310
parameters.setTaskList(options.getTaskList());
327-
parameters.setChildPolicy(options.getChildPolicy());
328311
parameters.setWorkflowIdReusePolicy(options.getWorkflowIdReusePolicy());
329312
RetryOptions retryOptions = options.getRetryOptions();
330313
if (retryOptions != null) {
@@ -376,8 +359,6 @@ public String toString() {
376359
+ executionStartToCloseTimeoutSeconds
377360
+ ", taskStartToCloseTimeoutSeconds="
378361
+ taskStartToCloseTimeoutSeconds
379-
+ ", childPolicy="
380-
+ childPolicy
381362
+ ", workflowIdReusePolicy="
382363
+ workflowIdReusePolicy
383364
+ ", retryParameters="
@@ -405,7 +386,6 @@ public boolean equals(Object o) {
405386
&& Objects.equals(workflowType, that.workflowType)
406387
&& Objects.equals(taskList, that.taskList)
407388
&& Arrays.equals(input, that.input)
408-
&& childPolicy == that.childPolicy
409389
&& workflowIdReusePolicy == that.workflowIdReusePolicy
410390
&& Objects.equals(retryParameters, that.retryParameters)
411391
&& Objects.equals(cronSchedule, that.cronSchedule)
@@ -422,7 +402,6 @@ public int hashCode() {
422402
taskList,
423403
executionStartToCloseTimeoutSeconds,
424404
taskStartToCloseTimeoutSeconds,
425-
childPolicy,
426405
workflowIdReusePolicy,
427406
retryParameters,
428407
cronSchedule,

src/main/java/com/uber/cadence/internal/common/TerminateWorkflowExecutionParameters.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,21 @@
1717

1818
package com.uber.cadence.internal.common;
1919

20-
import com.uber.cadence.ChildPolicy;
2120
import com.uber.cadence.WorkflowExecution;
2221

2322
public class TerminateWorkflowExecutionParameters {
2423

2524
private WorkflowExecution workflowExecution;
2625

27-
private ChildPolicy childPolicy;
28-
2926
private String reason;
3027

3128
private byte[] details;
3229

3330
public TerminateWorkflowExecutionParameters() {}
3431

3532
public TerminateWorkflowExecutionParameters(
36-
WorkflowExecution workflowExecution, ChildPolicy childPolicy, String reason, byte[] details) {
33+
WorkflowExecution workflowExecution, String reason, byte[] details) {
3734
this.workflowExecution = workflowExecution;
38-
this.childPolicy = childPolicy;
3935
this.reason = reason;
4036
this.details = details;
4137
}
@@ -54,19 +50,6 @@ public TerminateWorkflowExecutionParameters withWorkflowExecution(
5450
return this;
5551
}
5652

57-
public ChildPolicy getChildPolicy() {
58-
return childPolicy;
59-
}
60-
61-
public void setChildPolicy(ChildPolicy childPolicy) {
62-
this.childPolicy = childPolicy;
63-
}
64-
65-
public TerminateWorkflowExecutionParameters withChildPolicy(ChildPolicy childPolicy) {
66-
this.childPolicy = childPolicy;
67-
return this;
68-
}
69-
7053
public String getReason() {
7154
return reason;
7255
}

src/main/java/com/uber/cadence/internal/replay/DecisionContext.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package com.uber.cadence.internal.replay;
1919

20-
import com.uber.cadence.ChildPolicy;
2120
import com.uber.cadence.WorkflowExecution;
2221
import com.uber.cadence.WorkflowType;
2322
import com.uber.cadence.converter.DataConverter;
@@ -69,8 +68,6 @@ public interface DecisionContext extends ReplayAware {
6968

7069
Duration getDecisionTaskTimeout();
7170

72-
ChildPolicy getChildPolicy();
73-
7471
/**
7572
* Used to dynamically schedule an activity for execution
7673
*

src/main/java/com/uber/cadence/internal/replay/DecisionContextImpl.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package com.uber.cadence.internal.replay;
1919

20-
import com.uber.cadence.ChildPolicy;
2120
import com.uber.cadence.DecisionTaskFailedCause;
2221
import com.uber.cadence.DecisionTaskFailedEventAttributes;
2322
import com.uber.cadence.HistoryEvent;
@@ -135,11 +134,6 @@ public Duration getDecisionTaskTimeout() {
135134
return Duration.ofSeconds(workflowContext.getDecisionTaskTimeoutSeconds());
136135
}
137136

138-
@Override
139-
public ChildPolicy getChildPolicy() {
140-
return workflowContext.getChildPolicy();
141-
}
142-
143137
@Override
144138
public String getTaskList() {
145139
return workflowContext.getTaskList();

src/main/java/com/uber/cadence/internal/replay/StartChildWorkflowExecutionParameters.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package com.uber.cadence.internal.replay;
1919

20-
import com.uber.cadence.ChildPolicy;
2120
import com.uber.cadence.WorkflowIdReusePolicy;
2221
import com.uber.cadence.WorkflowType;
2322
import com.uber.cadence.internal.common.RetryParameters;
@@ -44,8 +43,6 @@ public static final class Builder {
4443

4544
private WorkflowType workflowType;
4645

47-
private ChildPolicy childPolicy;
48-
4946
private WorkflowIdReusePolicy workflowIdReusePolicy;
5047

5148
private RetryParameters retryParameters;
@@ -93,11 +90,6 @@ public Builder setWorkflowType(WorkflowType workflowType) {
9390
return this;
9491
}
9592

96-
public Builder setChildPolicy(ChildPolicy childPolicy) {
97-
this.childPolicy = childPolicy;
98-
return this;
99-
}
100-
10193
public Builder setWorkflowIdReusePolicy(WorkflowIdReusePolicy workflowIdReusePolicy) {
10294
this.workflowIdReusePolicy = workflowIdReusePolicy;
10395
return this;
@@ -123,7 +115,6 @@ public StartChildWorkflowExecutionParameters build() {
123115
taskStartToCloseTimeoutSeconds,
124116
workflowId,
125117
workflowType,
126-
childPolicy,
127118
workflowIdReusePolicy,
128119
retryParameters,
129120
cronSchedule);
@@ -146,8 +137,6 @@ public StartChildWorkflowExecutionParameters build() {
146137

147138
private final WorkflowType workflowType;
148139

149-
private final ChildPolicy childPolicy;
150-
151140
private final WorkflowIdReusePolicy workflowIdReusePolicy;
152141

153142
private final RetryParameters retryParameters;
@@ -163,7 +152,6 @@ private StartChildWorkflowExecutionParameters(
163152
long taskStartToCloseTimeoutSeconds,
164153
String workflowId,
165154
WorkflowType workflowType,
166-
ChildPolicy childPolicy,
167155
WorkflowIdReusePolicy workflowIdReusePolicy,
168156
RetryParameters retryParameters,
169157
String cronSchedule) {
@@ -175,7 +163,6 @@ private StartChildWorkflowExecutionParameters(
175163
this.taskStartToCloseTimeoutSeconds = taskStartToCloseTimeoutSeconds;
176164
this.workflowId = workflowId;
177165
this.workflowType = workflowType;
178-
this.childPolicy = childPolicy;
179166
this.workflowIdReusePolicy = workflowIdReusePolicy;
180167
this.retryParameters = retryParameters;
181168
this.cronSchedule = cronSchedule;
@@ -213,10 +200,6 @@ public WorkflowType getWorkflowType() {
213200
return workflowType;
214201
}
215202

216-
public ChildPolicy getChildPolicy() {
217-
return childPolicy;
218-
}
219-
220203
public WorkflowIdReusePolicy getWorkflowIdReusePolicy() {
221204
return workflowIdReusePolicy;
222205
}
@@ -242,7 +225,6 @@ public boolean equals(Object o) {
242225
&& Objects.equals(taskList, that.taskList)
243226
&& Objects.equals(workflowId, that.workflowId)
244227
&& Objects.equals(workflowType, that.workflowType)
245-
&& childPolicy == that.childPolicy
246228
&& workflowIdReusePolicy == that.workflowIdReusePolicy
247229
&& Objects.equals(retryParameters, that.retryParameters)
248230
&& Objects.equals(cronSchedule, that.cronSchedule);
@@ -259,7 +241,6 @@ public int hashCode() {
259241
taskStartToCloseTimeoutSeconds,
260242
workflowId,
261243
workflowType,
262-
childPolicy,
263244
workflowIdReusePolicy,
264245
retryParameters,
265246
cronSchedule);
@@ -290,8 +271,6 @@ public String toString() {
290271
+ '\''
291272
+ ", workflowType="
292273
+ workflowType
293-
+ ", childPolicy="
294-
+ childPolicy
295274
+ ", workflowIdReusePolicy="
296275
+ workflowIdReusePolicy
297276
+ ", retryParameters="

src/main/java/com/uber/cadence/internal/replay/WorkflowContext.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,6 @@ private WorkflowExecutionStartedEventAttributes getWorkflowStartedEventAttribute
120120
return startedAttributes;
121121
}
122122

123-
public ChildPolicy getChildPolicy() {
124-
return startedAttributes.getChildPolicy();
125-
}
126-
127123
void setCurrentRunId(String currentRunId) {
128124
this.currentRunId = currentRunId;
129125
}

0 commit comments

Comments
 (0)