Skip to content

Commit

Permalink
Add more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Apr 15, 2024
1 parent 1155066 commit a6bc7c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ subprojects {

java {
// graal only supports java 8, 11, 16, 17, 21
sourceCompatibility = project.hasProperty("edgeDepsTest") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_21
targetCompatibility = project.hasProperty("edgeDepsTest") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_21
sourceCompatibility = project.hasProperty("edgeDepsTest") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_1_8
targetCompatibility = project.hasProperty("edgeDepsTest") ? JavaVersion.VERSION_21 : JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
Expand All @@ -24,10 +24,10 @@ subprojects {
compileTestJava {
options.encoding = 'UTF-8'
options.compilerArgs << '-Xlint:none' << '-Xlint:deprecation' << '-Werror' << '-parameters'
// if (JavaVersion.current().isJava9Compatible() && !project.hasProperty("edgeDepsTest")) {
// // https://stackoverflow.com/a/43103115/525203
// options.compilerArgs.addAll(['--release', '8'])
// }
if (JavaVersion.current().isJava9Compatible() && !project.hasProperty("edgeDepsTest")) {
// https://stackoverflow.com/a/43103115/525203
options.compilerArgs.addAll(['--release', '8'])
}
}

javadoc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package io.temporal.worker;

import com.google.common.base.Preconditions;
import io.temporal.common.Experimental;
import io.temporal.common.interceptors.WorkerInterceptor;
import java.time.Duration;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -121,6 +122,15 @@ public Builder setEnableLoggingInReplay(boolean enableLoggingInReplay) {
return this;
}


/**
* Enable the use of Virtual Threads for workflow execution across all workers created by
* this factory. This includes cached workflows. This option is only supported for JDK >= 21.
* If set then {@link #setMaxWorkflowThreadCount(int)} is ignored.
*
* <p>Default is false
*/
@Experimental
public Builder setEnableVirtualThreads(boolean enableVirtualThreads) {
this.enableVirtualThreads = enableVirtualThreads;
return this;
Expand Down Expand Up @@ -208,6 +218,7 @@ public int getMaxWorkflowThreadCount() {
return maxWorkflowThreadCount;
}

@Experimental
public boolean isEnableVirtualThreads() {
return enableVirtualThreads;
}
Expand Down

0 comments on commit a6bc7c8

Please sign in to comment.