Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: "11"
java-version: "23"
distribution: "temurin"

- name: Set up Gradle
Expand All @@ -200,6 +200,30 @@ jobs:
- name: Run copyright and code format checks
run: ./gradlew --no-daemon spotlessCheck

javadoc:
name: Javadoc
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
fetch-depth: 0
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: "23"
distribution: "temurin"

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v5

- name: Run javadoc
run: ./gradlew --no-daemon javadoc
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this added only as a pass-or-fail check, or are you suggesting we do something with the output of that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pass fail - but you can see the output and fix any issues locally?


build_native_images:
name: Build native test server
uses: ./.github/workflows/build-native-image.yml
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ src/main/idls/*
.settings
.vscode/
*/bin
/.claude
/.claude
mise.local.toml
**/.factorypath
5 changes: 2 additions & 3 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ subprojects {

javadoc {
options.encoding = 'UTF-8'
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
options.addStringOption('Xdoclint:reference', '-quiet')
options.addBooleanOption('Werror', true)
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static ClientConfig fromToml(byte[] tomlData, ClientConfigFromTomlOptions
*
* @param config the client config to convert
* @return the TOML data as bytes
* @apiNote The output will not be identical to the input if the config was loaded from a file
* <p>Note: The output will not be identical to the input if the config was loaded from a file
* because comments and formatting are not preserved.
*/
public static byte[] toTomlAsBytes(ClientConfig config) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
/**
* Performs encoding/decoding of the payloads via the Remote Data Encoder (RDE) available over http.
*
* <p>
*
* <h2>Remote Data Encoder Http Server specification</h2>
*
* <p>RDE Server must:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ public interface ActivityInfo {
/**
* Return the priority of the activity task.
*
* @apiNote If unset or on an older server version, this method will return {@link
* Priority#getDefaultInstance()}.
* <p>Note: If unset or on an older server version, this method will return {@link
* Priority#getDefaultInstance()}.
*/
@Experimental
@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
* When <code>CImpl</code> instance is registered with the {@link io.temporal.worker.Worker} the
* following activities are registered:
*
* <p>
*
* <ul>
* <li>B_a
* <li>B_b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOp
* @param workflowId Workflow id.
* @param runId Run id of the workflow execution.
* @return Stub that implements workflowInterface and can be used to signal, update, or query it.
* @deprecated Use {@link #newWorkflowStub(Class, WorkflowTargetOptions)} instead.
* @apiNote This method is deprecated because the returned stub does not properly account for the
* runId.
* @deprecated Use {@link #newWorkflowStub(Class, WorkflowTargetOptions)} instead. This method is
* deprecated because the returned stub does not properly account for the runId.
*/
@Deprecated
<T> T newWorkflowStub(Class<T> workflowInterface, String workflowId, Optional<String> runId);
Expand Down Expand Up @@ -205,9 +204,8 @@ static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOp
* workflowId is assumed.
* @param workflowType type of the workflow. Optional as it is used for error reporting only.
* @return Stub that can be used to start workflow and later to signal or query it.
* @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead.
* @apiNote This method is deprecated because the returned stub does not properly account for the
* runId.
* @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead. This
* method is deprecated because the returned stub does not properly account for the runId.
*/
@Deprecated
WorkflowStub newUntypedWorkflowStub(
Expand All @@ -220,9 +218,8 @@ WorkflowStub newUntypedWorkflowStub(
* @param execution workflow id and optional run id for execution
* @param workflowType type of the workflow. Optional as it is used for error reporting only.
* @return Stub that can be used to start workflow and later to signal or query it.
* @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead.
* @apiNote This method is deprecated because the returned stub does not properly account for the
* runId.
* @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead. This
* method is deprecated because the returned stub does not properly account for the runId.
*/
WorkflowStub newUntypedWorkflowStub(WorkflowExecution execution, Optional<String> workflowType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
/**
* Plugin interface for customizing Temporal workflow client configuration.
*
* <p>This interface is separate from {@link
* io.temporal.serviceclient.WorkflowServiceStubs.ServiceStubsPlugin} to allow plugins that only
* need to configure the workflow client without affecting the underlying gRPC connection.
* <p>This interface is separate from {@link io.temporal.serviceclient.WorkflowServiceStubsPlugin}
* to allow plugins that only need to configure the workflow client without affecting the underlying
* gRPC connection.
*
* <p>Plugins that implement both {@code ServiceStubsPlugin} and {@code WorkflowClientPlugin} will
* have their service stubs configuration applied when creating the service stubs, and their client
Expand All @@ -54,7 +54,7 @@
* }
* }</pre>
*
* @see io.temporal.serviceclient.WorkflowServiceStubs.ServiceStubsPlugin
* @see io.temporal.serviceclient.WorkflowServiceStubsPlugin
* @see io.temporal.worker.WorkerPlugin
* @see SimplePlugin
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public WorkflowExecutionDescription(
/**
* Get the fixed summary for this workflow execution.
*
* @apiNote Will be decoded on each invocation, so it is recommended to cache the result if it is
* used multiple times.
* <p>Note: Will be decoded on each invocation, so it is recommended to cache the result if it is
* used multiple times.
*/
@Experimental
@Nullable
Expand All @@ -45,8 +45,8 @@ public String getStaticSummary() {
/**
* Get the details summary for this workflow execution.
*
* @apiNote Will be decoded on each invocation, so it is recommended to cache the result if it is
* used multiple times.
* <p>Note: Will be decoded on each invocation, so it is recommended to cache the result if it is
* used multiple times.
*/
@Experimental
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public Builder setWorkflowId(String workflowId) {
/**
* Specifies server behavior if a completed workflow with the same id exists. Note that under no
* conditions Temporal allows two workflows with the same namespace and workflow id run
* simultaneously. See {@line setWorkflowIdConflictPolicy} for handling a workflow id
* simultaneously. See {@link #setWorkflowIdConflictPolicy} for handling a workflow id
* duplication with a <b>Running</b> workflow.
*
* <p>Default value if not set: <b>AllowDuplicate</b>
Expand Down
28 changes: 16 additions & 12 deletions temporal-sdk/src/main/java/io/temporal/client/WorkflowStub.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,13 @@ <R> R getResult(long timeout, TimeUnit unit, Class<R> resultClass, Type resultTy
* to complete. Behind the scenes this call performs long polls the Temporal Server waiting for
* workflow completion.
*
* <p>See {@link #getResult(Class)} as a sync version of this method for detailed information
* about exceptions that may be thrown from {@link CompletableFuture#get()} wrapped by {@link
* ExecutionException}.
*
* @param resultClass class of the workflow return value
* @param <R> type of the workflow return value
* @return future completed with workflow return value or an exception
* @see #getResult(Class) as a sync version of this method for detailed information about
* exceptions that may be thrown from {@link CompletableFuture#get()} wrapped by {@link
* ExecutionException}
*/
<R> CompletableFuture<R> getResultAsync(Class<R> resultClass);

Expand All @@ -283,14 +284,15 @@ <R> R getResult(long timeout, TimeUnit unit, Class<R> resultClass, Type resultTy
* to complete. Behind the scene this call performs long poll on Temporal service waiting for
* workflow completion notification.
*
* <p>See {@link #getResult(Class, Type)} as a sync version of this method for detailed
* information about exceptions that may be thrown from {@link CompletableFuture#get()} wrapped by
* {@link ExecutionException}.
*
* @param resultClass class of the workflow return value
* @param resultType type of the workflow return value. Differs from {@code resultClass} for
* generic types.
* @param <R> type of the workflow return value
* @return future completed with workflow return value or an exception
* @see #getResult(Class, Type) as a sync version of this method for detailed information about
* exceptions that may be thrown from {@link CompletableFuture#get()} wrapped by {@link
* ExecutionException}
*/
<R> CompletableFuture<R> getResultAsync(Class<R> resultClass, Type resultType);

Expand All @@ -299,14 +301,15 @@ <R> R getResult(long timeout, TimeUnit unit, Class<R> resultClass, Type resultTy
* to complete. Behind the scene this call performs long poll on Temporal service waiting for
* workflow completion notification.
*
* <p>See {@link #getResult(long, TimeUnit, Class)} as a sync version of this method for detailed
* information about exceptions that may be thrown from {@link CompletableFuture#get()} wrapped by
* {@link ExecutionException}.
*
* @param timeout maximum time to wait and perform a background long poll
* @param unit unit of timeout
* @param resultClass class of the workflow return value
* @param <R> type of the workflow return value
* @return future completed with workflow return value or an exception
* @see #getResult(long, TimeUnit, Class) as a sync version of this method for detailed
* information about exceptions that may be thrown from {@link CompletableFuture#get()}
* wrapped by {@link ExecutionException}
*/
<R> CompletableFuture<R> getResultAsync(long timeout, TimeUnit unit, Class<R> resultClass);

Expand All @@ -315,16 +318,17 @@ <R> R getResult(long timeout, TimeUnit unit, Class<R> resultClass, Type resultTy
* to complete. Behind the scene this call performs long poll on Temporal service waiting for
* workflow completion notification.
*
* <p>See {@link #getResult(long, TimeUnit, Class, Type)} as a sync version of this method for
* detailed information about exceptions that may be thrown from {@link CompletableFuture#get()}
* wrapped by {@link ExecutionException}.
*
* @param timeout maximum time to wait and perform a background long poll
* @param unit unit of timeout
* @param resultClass class of the workflow return value
* @param resultType type of the workflow return value. Differs from {@code resultClass} for
* generic types.
* @param <R> type of the workflow return value
* @return future completed with workflow return value or an exception
* @see #getResult(long, TimeUnit, Class, Type) as a sync version of this method for detailed
* information about exceptions that may be thrown from {@link CompletableFuture#get()}
* wrapped by {@link ExecutionException}
*/
<R> CompletableFuture<R> getResultAsync(
long timeout, TimeUnit unit, Class<R> resultClass, Type resultType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public <T> Builder setWorkflowType(Class<T> workflowInterface) {
/**
* Set the workflow options to use when starting a workflow action.
*
* @note ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and
* start signal cannot be set or an error will occur. Schedules requires the use of typed
* search attributes and untyped search attributes will be ignored.
* <p>Note: ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and
* start signal cannot be set or an error will occur. Schedules requires the use of typed search
* attributes and untyped search attributes will be ignored.
*/
public Builder setOptions(WorkflowOptions options) {
this.options = options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* <p>The implementation must forward all the calls to {@code next}, but it may change the input
* parameters.
*
* @see WorkerInterceptor#interceptWorkflow(WorkflowInboundCallsInterceptor) for a definition of
* "next" {@link WorkflowInboundCallsInterceptor}
* <p>See {@link WorkerInterceptor#interceptWorkflow(WorkflowInboundCallsInterceptor)} for a
* definition of "next" {@link WorkflowInboundCallsInterceptor}.
*/
@Experimental
public interface WorkflowInboundCallsInterceptor {
Expand Down Expand Up @@ -166,10 +166,11 @@ public Object getResult() {
*
* <p>The instance should be passed into the {next.init(newWorkflowOutboundCallsInterceptor)}.
*
* <p>See {@link WorkerInterceptor#interceptWorkflow} for the definition of "next" {@link
* WorkflowInboundCallsInterceptor}.
*
* @param outboundCalls an existing interceptor instance to be proxied by the interceptor created
* inside this method
* @see WorkerInterceptor#interceptWorkflow for the definition of "next" {@link
* WorkflowInboundCallsInterceptor}
*/
void init(WorkflowOutboundCallsInterceptor outboundCalls);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* implementation must forward all the calls to the outbound interceptor passed as a {@code
* outboundCalls} parameter to the {@code init} call.
*
* @see WorkerInterceptor#interceptWorkflow for the definition of "next" {@link
* WorkflowInboundCallsInterceptor}.
* @see WorkerInterceptor#interceptWorkflow for the definition of "next"
* WorkflowInboundCallsInterceptor.
*/
@Experimental
public interface WorkflowOutboundCallsInterceptor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This package and its subpackages contain implementation classes of the Temporal SDK.
*
* <p><strong></strong>Do not use them directly in any application code! There is absolutely no
* guarantee about backwards compatibility of APIs in the internal packages.</strong>
* <p><strong>Do not use them directly in any application code! There is absolutely no guarantee
* about backwards compatibility of APIs in the internal packages.</strong>
*/
package io.temporal.internal;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Internal delegate for virtual thread handling on JDK 21. This is a dummy version for reachability
* on JDK <21.
* on JDK &lt;21.
*/
public final class VirtualThreadDelegate {
public static ExecutorService newVirtualThreadExecutor(ThreadConfigurator configurator) {
Expand Down
4 changes: 0 additions & 4 deletions temporal-sdk/src/main/java/io/temporal/worker/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ public <R> void addWorkflowImplementationFactory(
* <p>This method is misaligned with other workflow implementation registration methods in this
* aspect.
*
* <p></font>
*
* @deprecated Use {@link #registerWorkflowImplementationFactory(Class, Func,
* WorkflowImplementationOptions)} with {@code
* WorkflowImplementationOptions.newBuilder().setFailWorkflowExceptionTypes(Throwable.class).build()}
Expand Down Expand Up @@ -304,8 +302,6 @@ public <R> void addWorkflowImplementationFactory(Class<R> workflowInterface, Fun
* instances is allowed. This way, the configuration is persisted into the history and maintained
* same during replay.
*
* <p></font>
*
* @param workflowInterface Workflow interface that this factory implements
* @param factory should create a new instance of the workflow implementation object every time
* it's called
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ public Builder setWorkerInterceptors(WorkerInterceptor... workerInterceptors) {
* Sets the worker plugins to use with workers created by this factory. Plugins can modify
* worker configuration and wrap worker lifecycle.
*
* <p>Note: Plugins that implement both {@link io.temporal.client.ClientPlugin} and {@link
* WorkerPlugin} are automatically propagated from the client. Use this method for worker-only
* plugins that don't need client-side configuration.
* <p>Note: Plugins that implement both {@link io.temporal.client.WorkflowClientPlugin} and
* {@link WorkerPlugin} are automatically propagated from the client. Use this method for
* worker-only plugins that don't need client-side configuration.
*
* @param plugins the worker plugins to use
* @return this builder for chaining
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/**
* Plugin interface for customizing Temporal worker configuration and lifecycle.
*
* <p>Plugins that also implement {@link io.temporal.client.ClientPlugin} are automatically
* <p>Plugins that also implement {@link io.temporal.client.WorkflowClientPlugin} are automatically
* propagated from the client to workers created from that client.
*
* <p>Example implementation:
Expand Down Expand Up @@ -61,7 +61,7 @@
* }
* }</pre>
*
* @see io.temporal.client.ClientPlugin
* @see io.temporal.client.WorkflowClientPlugin
* @see SimplePlugin
*/
@Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public interface DispatchCallback extends Function<WorkflowTask, Boolean> {
*
* @param workflowTask WorkflowTask to be dispatched
* @return true if the dispatch was successful and false otherwise
* @throws IllegalArgumentException if {@code workflowTask} doesn't belong to the task queue of the Worker that provided the {@link WorkflowTaskDispatchHandle
* @throws IllegalArgumentException if {@code workflowTask} doesn't belong to the task queue of
* the Worker that provided the {@link WorkflowTaskDispatchHandle}
*/
@Override
Boolean apply(WorkflowTask workflowTask) throws IllegalArgumentException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface SlotReserveContext<SI extends SlotInfo> {
String getTaskQueue();

/**
* @return A read-only & safe for concurrent access mapping of slot permits to the information
* @return A read-only &amp; safe for concurrent access mapping of slot permits to the information
* associated with the in-use slot. This map is changed internally any time new slots are
* used.
*/
Expand Down
Loading
Loading