From 884a235de8cc96e3a6bcd3215f5c869f48762c0a 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 797be9e0ec..b0e5d92d4a 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicQueryHandler.java @@ -3,7 +3,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 d4c8caad1a..c34db070e8 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java @@ -3,7 +3,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 dd880b99ac..9f9b7f1df1 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java @@ -3,13 +3,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 f4c8f9e619..51475890ab 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicWorkflow.java @@ -11,7 +11,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 663677d387..99b3a5535a 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java @@ -5,8 +5,8 @@ import javax.annotation.Nullable; /** - * 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) @@ -28,7 +28,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 6f61e7c79a..e664172702 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 @@ -1,6 +1,6 @@ /** * 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

* @@ -45,15 +45,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 2804423a2eb192bb6af30b6b333be314c560a30f 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 c34db070e8..efaaf51c60 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicSignalHandler.java @@ -3,8 +3,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 9f9b7f1df1..281b8f39b5 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/DynamicUpdateHandler.java @@ -3,8 +3,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 99b3a5535a..1305105d85 100644 --- a/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java +++ b/temporal-sdk/src/main/java/io/temporal/workflow/ExternalWorkflowStub.java @@ -5,9 +5,9 @@ import javax.annotation.Nullable; /** - * 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 e664172702..f8372c2e58 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 @@ -45,10 +45,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

*