From 3f1cc5361a0e4372bacd643080a50a39f31de35a Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 25 Jul 2024 08:29:00 -0400 Subject: [PATCH 1/2] Miscellaneous docstring edits --- .../io/temporal/workflow/DynamicQueryHandler.java | 2 +- .../io/temporal/workflow/DynamicSignalHandler.java | 2 +- .../io/temporal/workflow/DynamicUpdateHandler.java | 4 ++-- .../java/io/temporal/workflow/DynamicWorkflow.java | 2 +- .../io/temporal/workflow/ExternalWorkflowStub.java | 6 +++--- .../main/java/io/temporal/workflow/package-info.java | 12 ++++++------ 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java index e64aabfde..cd8d23201 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java @@ -23,7 +23,7 @@ import io.temporal.common.converter.EncodedValues; /** - * Use DynamicQueryHandler to process any query dynamically. This is useful for a library level code + * Use DynamicQueryHandler to process any query dynamically. This is useful for library-level code * and implementation of DSLs. * *

Use {@link Workflow#registerListener(Object)} to register an implementation of the diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java index e9d1f8df9..258499ae5 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java @@ -23,7 +23,7 @@ import io.temporal.common.converter.EncodedValues; /** - * Use DynamicSignalHandler to process any signal dynamically. This is useful for a library level + * Use DynamicSignalHandler to process any signal dynamically. This is useful for library-level * code and implementation of DSLs. * *

Use {@link Workflow#registerListener(Object)} to register an implementation of the diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java index e82bca9fc..53a61162e 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java @@ -23,13 +23,13 @@ import io.temporal.common.converter.EncodedValues; /** - * Use DynamicUpdateHandler to process any update dynamically. This is useful for a library level + * Use DynamicUpdateHandler to process any update dynamically. This is useful for library-level * code and implementation of DSLs. * *

Use {@link Workflow#registerListener(Object)} to register an implementation of the * DynamicUpdateListener. Only one such listener can be registered per workflow execution. * - *

When registered any signals which don't have a specific handler will be delivered to it. + *

When registered any updates which don't have a specific handler will be delivered to it. * * @see DynamicQueryHandler * @see DynamicSignalHandler diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java index b924006d6..8ee2d9ace 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java @@ -29,7 +29,7 @@ * one type that implements DynamicWorkflow per worker is allowed. * *

The main use case for DynamicWorkflow is an implementation of custom Domain Specific Languages - * (DSLs). A single implementation can implement a workflow type which definition is dynamically + * (DSLs). A single implementation can implement a workflow type whose definition is dynamically * loaded from some external source. * *

Use {@link Workflow#getInfo()} to query information about the workflow type that should be diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java index 7984303c3..0605eb75d 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java @@ -24,8 +24,8 @@ import io.temporal.internal.sync.StubMarker; /** - * Supports signalling and cancelling any workflows by the workflow type and their id. This is - * useful when an external workflow type is not known at the compile time and to call workflows in + * Supports signalling and cancelling any workflow by the workflow type and their id. This is + * useful when an external workflow type is not known at compile time and to call workflows in * other languages. * * @see Workflow#newUntypedExternalWorkflowStub(String) @@ -47,7 +47,7 @@ static ExternalWorkflowStub fromTyped(T typed) { } if (typed instanceof ChildWorkflowStub) { throw new IllegalArgumentException( - "Use ChildWorkflowStub.fromTyped to extract sbub created through Workflow#newChildWorkflowStub"); + "Use ChildWorkflowStub.fromTyped to extract stub created through Workflow#newChildWorkflowStub"); } @SuppressWarnings("unchecked") StubMarker supplier = (StubMarker) typed; diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java b/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java index 737ccf6cc..e5ec25ea5 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java @@ -20,7 +20,7 @@ /** * Workflow encapsulates the orchestration of activities and child workflows. It can also answer to - * synchronous queries and receive external events (also known as signals). + * synchronous queries and receive other external requests (signals and updates). * *

Workflow Interface

* @@ -65,15 +65,15 @@ * started, a new instance of the workflow implementation object is created. Then, one of the * methods (depending on which workflow type has been started) annotated with {@literal @}{@link * io.temporal.workflow.WorkflowMethod} is invoked. As soon as this method returns the workflow, - * execution is closed. While workflow execution is open, it can receive calls to signal and query - * methods. No additional calls to workflow methods are allowed. The workflow object is stateful, so - * query and signal methods can communicate with the other parts of the workflow through workflow - * object fields. + * execution is closed. While the workflow execution is open, it can receive calls to signal, update, + * and query methods. No additional calls to workflow methods are allowed. The workflow object is + * stateful, so query, signal, and update methods can communicate with the other parts of the workflow + * through workflow object fields. * *

Calling Activities

* * {@link io.temporal.workflow.Workflow#newActivityStub(Class)} returns a client-side stub that - * implements an activity interface. It takes activity type and activity options as arguments. + * implements an activity interface. It takes an activity type and activity options as arguments. * Activity options are needed only if some of the required timeouts are not specified through the * {@literal @}{@link io.temporal.activity.ActivityMethod} annotation. * From 58859437eb41e7cec125d5e52279eb35c97f1b7d Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 25 Jul 2024 09:32:02 -0400 Subject: [PATCH 2/2] ./gradlew :temporal-sdk:spotlessApply --- .../java/io/temporal/workflow/DynamicSignalHandler.java | 4 ++-- .../java/io/temporal/workflow/DynamicUpdateHandler.java | 4 ++-- .../java/io/temporal/workflow/ExternalWorkflowStub.java | 6 +++--- .../src/main/java/io/temporal/workflow/package-info.java | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java index 258499ae5..f31e74ec5 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java @@ -23,8 +23,8 @@ import io.temporal.common.converter.EncodedValues; /** - * Use DynamicSignalHandler to process any signal dynamically. This is useful for library-level - * code and implementation of DSLs. + * Use DynamicSignalHandler to process any signal dynamically. This is useful for library-level code + * and implementation of DSLs. * *

Use {@link Workflow#registerListener(Object)} to register an implementation of the * DynamicSignalListener. Only one such listener can be registered per workflow execution. diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java index 53a61162e..cd4067be6 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java @@ -23,8 +23,8 @@ import io.temporal.common.converter.EncodedValues; /** - * Use DynamicUpdateHandler to process any update dynamically. This is useful for library-level - * code and implementation of DSLs. + * Use DynamicUpdateHandler to process any update dynamically. This is useful for library-level code + * and implementation of DSLs. * *

Use {@link Workflow#registerListener(Object)} to register an implementation of the * DynamicUpdateListener. Only one such listener can be registered per workflow execution. diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java index 0605eb75d..6623d2845 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java @@ -24,9 +24,9 @@ import io.temporal.internal.sync.StubMarker; /** - * Supports signalling and cancelling any workflow by the workflow type and their id. This is - * useful when an external workflow type is not known at compile time and to call workflows in - * other languages. + * Supports signalling and cancelling any workflow by the workflow type and their id. This is useful + * when an external workflow type is not known at compile time and to call workflows in other + * languages. * * @see Workflow#newUntypedExternalWorkflowStub(String) */ diff --git a/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java b/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java index e5ec25ea5..32de3eeaf 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/package-info.java @@ -65,10 +65,10 @@ * started, a new instance of the workflow implementation object is created. Then, one of the * methods (depending on which workflow type has been started) annotated with {@literal @}{@link * io.temporal.workflow.WorkflowMethod} is invoked. As soon as this method returns the workflow, - * execution is closed. While the workflow execution is open, it can receive calls to signal, update, - * and query methods. No additional calls to workflow methods are allowed. The workflow object is - * stateful, so query, signal, and update methods can communicate with the other parts of the workflow - * through workflow object fields. + * execution is closed. While the workflow execution is open, it can receive calls to signal, + * update, and query methods. No additional calls to workflow methods are allowed. The workflow + * object is stateful, so query, signal, and update methods can communicate with the other parts of + * the workflow through workflow object fields. * *

Calling Activities

*