Skip to content

Commit 4000fff

Browse files
authored
Merge pull request #76 from uber/addLicense
Adding the licenses and linter to the non-covered files
2 parents 878cfe0 + 2a04c55 commit 4000fff

File tree

8 files changed

+107
-21
lines changed

8 files changed

+107
-21
lines changed

src/main/java/com/uber/cadence/samples/clientsamples/CadenceUtil.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
import com.uber.cadence.serviceclient.WorkflowServiceTChannel;
2626

2727
public class CadenceUtil {
28-
public static WorkflowClient getWorkflowClient() {
29-
return WorkflowClient.newInstance(
30-
new WorkflowServiceTChannel(ClientOptions.defaultInstance()),
31-
WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build());
32-
}
33-
}
28+
public static WorkflowClient getWorkflowClient() {
29+
return WorkflowClient.newInstance(
30+
new WorkflowServiceTChannel(ClientOptions.defaultInstance()),
31+
WorkflowClientOptions.newBuilder().setDomain(DOMAIN).build());
32+
}
33+
}

src/main/java/com/uber/cadence/samples/clientsamples/HelloWorldSample.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
import java.time.Duration;
2727

2828
public class HelloWorldSample {
29-
public static void main(String[] args) {
30-
WorkflowClient workflowClient = CadenceUtil.getWorkflowClient();
31-
WorkflowOptions workflowOptions =
32-
new WorkflowOptions.Builder()
33-
.setExecutionStartToCloseTimeout(Duration.ofSeconds(30))
34-
.setTaskList(Constant.TASK_LIST)
35-
.build();
29+
public static void main(String[] args) {
30+
WorkflowClient workflowClient = CadenceUtil.getWorkflowClient();
31+
WorkflowOptions workflowOptions =
32+
new WorkflowOptions.Builder()
33+
.setExecutionStartToCloseTimeout(Duration.ofSeconds(30))
34+
.setTaskList(Constant.TASK_LIST)
35+
.build();
3636

37-
HelloWorldWorkflow helloWorldWorkflow =
38-
workflowClient.newWorkflowStub(HelloWorldWorkflow.class, workflowOptions);
39-
WorkflowExecution execution =
40-
WorkflowClient.start(helloWorldWorkflow::sayHello, new SampleMessage("Uber"));
41-
System.out.printf("WorkflowID: %s, RunID: %s", execution.getWorkflowId(), execution.getRunId());
42-
}
43-
}
37+
HelloWorldWorkflow helloWorldWorkflow =
38+
workflowClient.newWorkflowStub(HelloWorldWorkflow.class, workflowOptions);
39+
WorkflowExecution execution =
40+
WorkflowClient.start(helloWorldWorkflow::sayHello, new SampleMessage("Uber"));
41+
System.out.printf("WorkflowID: %s, RunID: %s", execution.getWorkflowId(), execution.getRunId());
42+
}
43+
}

src/main/java/com/uber/cadence/samples/spring/models/SampleMessage.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
7+
* use this file except in compliance with the License. A copy of the License is
8+
* located at
9+
*
10+
* http://aws.amazon.com/apache2.0
11+
*
12+
* or in the "license" file accompanying this file. This file is distributed on
13+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14+
* express or implied. See the License for the specific language governing
15+
* permissions and limitations under the License.
16+
*/
17+
118
package com.uber.cadence.samples.spring.models;
219

320
public class SampleMessage {

src/main/java/com/uber/cadence/samples/spring/workflows/ChildWorkflow.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
7+
* use this file except in compliance with the License. A copy of the License is
8+
* located at
9+
*
10+
* http://aws.amazon.com/apache2.0
11+
*
12+
* or in the "license" file accompanying this file. This file is distributed on
13+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14+
* express or implied. See the License for the specific language governing
15+
* permissions and limitations under the License.
16+
*/
17+
118
package com.uber.cadence.samples.spring.workflows;
219

320
import com.uber.cadence.workflow.WorkflowMethod;

src/main/java/com/uber/cadence/samples/spring/workflows/ParentWorkflow.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
7+
* use this file except in compliance with the License. A copy of the License is
8+
* located at
9+
*
10+
* http://aws.amazon.com/apache2.0
11+
*
12+
* or in the "license" file accompanying this file. This file is distributed on
13+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14+
* express or implied. See the License for the specific language governing
15+
* permissions and limitations under the License.
16+
*/
17+
118
package com.uber.cadence.samples.spring.workflows;
219

320
import static com.uber.cadence.samples.spring.common.Constant.TASK_LIST;

src/main/java/com/uber/cadence/samples/spring/workflows/impl/ChildWorkflowImpl.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
7+
* use this file except in compliance with the License. A copy of the License is
8+
* located at
9+
*
10+
* http://aws.amazon.com/apache2.0
11+
*
12+
* or in the "license" file accompanying this file. This file is distributed on
13+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14+
* express or implied. See the License for the specific language governing
15+
* permissions and limitations under the License.
16+
*/
17+
118
package com.uber.cadence.samples.spring.workflows.impl;
219

320
import com.uber.cadence.samples.spring.workflows.ChildWorkflow;

src/main/java/com/uber/cadence/samples/spring/workflows/impl/ParentWorkflowImpl.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Modifications copyright (C) 2017 Uber Technologies, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
7+
* use this file except in compliance with the License. A copy of the License is
8+
* located at
9+
*
10+
* http://aws.amazon.com/apache2.0
11+
*
12+
* or in the "license" file accompanying this file. This file is distributed on
13+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14+
* express or implied. See the License for the specific language governing
15+
* permissions and limitations under the License.
16+
*/
17+
118
package com.uber.cadence.samples.spring.workflows.impl;
219

320
import com.uber.cadence.samples.spring.models.SampleMessage;

src/main/java/com/uber/cadence/samples/spring/workflows/impl/SignalWorkflowImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public void getGreeting(SampleMessage sampleMessage) {
4242
this.greetingMsg = "";
4343

4444
// A workflow execution cannot receive infinite number of signals due to history limit
45-
// By default 10000 is MaximumSignalsPerExecution which can be configured by DynamicConfig of Cadence cluster.
45+
// By default 10000 is MaximumSignalsPerExecution which can be configured by DynamicConfig
46+
// of Cadence cluster.
4647
// But it's recommended to do continueAsNew after receiving certain number of signals.
4748
// in production, use a number <1000.
4849
if (count == 3) {

0 commit comments

Comments
 (0)