diff --git a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntime.java b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntime.java
index a8a2b789e..e1609eeac 100644
--- a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntime.java
+++ b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntime.java
@@ -18,6 +18,7 @@
import javax.annotation.concurrent.ThreadSafe;
import dev.cel.common.CelAbstractSyntaxTree;
import dev.cel.runtime.CelEvaluationException;
+import dev.cel.runtime.CelRuntimeFactory;
import dev.cel.runtime.UnknownContext;
/**
@@ -32,11 +33,21 @@
*
{@link AsyncProgram} provides an evaluation manager to automate evaluating and resolving
* unknown data
*
+ *
+ * @deprecated Migrate to the planner's asynchronous evaluation ({@link
+ * CelRuntimeFactory#plannerRuntimeBuilder()}, {@code CelFunctionBinding.fromAsync}, and {@code
+ * Program.evalAsync}).
*/
+@Deprecated
@ThreadSafe
public interface CelAsyncRuntime {
- /** AsyncProgram wraps a CEL Program with a driver to resolve unknowns as they are encountered. */
+ /**
+ * AsyncProgram wraps a CEL Program with a driver to resolve unknowns as they are encountered.
+ *
+ * @deprecated Migrate to {@code Program.evalAsync} (see {@link CelAsyncRuntime}).
+ */
+ @Deprecated
interface AsyncProgram {
ListenableFuture evaluateToCompletion(
CelResolvableAttributePattern... resolvableAttributes);
diff --git a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeBuilder.java b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeBuilder.java
index 23400fcf0..a5a5af89a 100644
--- a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeBuilder.java
+++ b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeBuilder.java
@@ -15,9 +15,17 @@
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import dev.cel.runtime.CelRuntime;
+import dev.cel.runtime.CelRuntimeFactory;
import java.util.concurrent.ExecutorService;
-/** Builder interface for {@link CelAsyncRuntime}. */
+/**
+ * Builder interface for {@link CelAsyncRuntime}.
+ *
+ * @deprecated Migrate to the planner's asynchronous evaluation ({@link
+ * CelRuntimeFactory#plannerRuntimeBuilder()}, {@code CelFunctionBinding.fromAsync}, and {@code
+ * Program.evalAsync}).
+ */
+@Deprecated
public interface CelAsyncRuntimeBuilder {
int DEFAULT_MAX_EVALUATE_ITERATIONS = 10;
@@ -58,5 +66,6 @@ public interface CelAsyncRuntimeBuilder {
@CanIgnoreReturnValue
CelAsyncRuntimeBuilder setExecutorService(ExecutorService executorService);
+ @SuppressWarnings("deprecation") // Retained on deprecated CelAsyncRuntimeBuilder
CelAsyncRuntime build();
}
diff --git a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeFactory.java b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeFactory.java
index 8712b429e..d0483034b 100644
--- a/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeFactory.java
+++ b/runtime/src/main/java/dev/cel/runtime/async/CelAsyncRuntimeFactory.java
@@ -14,8 +14,23 @@
package dev.cel.runtime.async;
-/** Factory for default {@link CelAsyncRuntime}. */
+import dev.cel.runtime.CelRuntimeFactory;
+
+/**
+ * Factory for default {@link CelAsyncRuntime}.
+ *
+ * @deprecated Migrate to the planner's asynchronous evaluation ({@link
+ * CelRuntimeFactory#plannerRuntimeBuilder()}, {@code CelFunctionBinding.fromAsync}, and {@code
+ * Program.evalAsync}).
+ */
+@Deprecated
public final class CelAsyncRuntimeFactory {
+
+ /**
+ * @deprecated See {@link CelAsyncRuntimeFactory}.
+ */
+ @Deprecated
+ @SuppressWarnings("deprecation") // Retained on deprecated CelAsyncRuntimeFactory
public static CelAsyncRuntimeBuilder defaultAsyncRuntime() {
return CelAsyncRuntimeImpl.newBuilder();
}