From dfa4768fc61b85993ab8fcbfe832f89c83738831 Mon Sep 17 00:00:00 2001 From: chaokunyang Date: Fri, 12 Jun 2020 10:49:01 +0800 Subject: [PATCH] [Java] Refactor java api (#8858) --- .../src/main/java/io/ray/api/ActorCall.java | 507 +-- .../src/main/java/io/ray/api/PyActorCall.java | 26 +- .../api/src/main/java/io/ray/api/RayCall.java | 3599 ++++------------- .../java/io/ray/api/call/ActorCreator.java | 38 + .../java/io/ray/api/call/ActorTaskCaller.java | 35 + .../io/ray/api/call/BaseActorCreator.java | 82 + .../java/io/ray/api/call/BaseTaskCaller.java | 52 + .../java/io/ray/api/call/PyActorCreator.java | 27 + .../io/ray/api/call/PyActorTaskCaller.java | 35 + .../java/io/ray/api/call/PyTaskCaller.java | 32 + .../main/java/io/ray/api/call/TaskCaller.java | 31 + .../io/ray/api/call/VoidActorTaskCaller.java | 28 + .../java/io/ray/api/call/VoidTaskCaller.java | 25 + .../java/io/ray/api/function/RayFunc.java | 3 +- .../java/io/ray/api/function/RayFunc0.java | 2 +- .../java/io/ray/api/function/RayFunc1.java | 2 +- .../java/io/ray/api/function/RayFunc2.java | 2 +- .../java/io/ray/api/function/RayFunc3.java | 2 +- .../java/io/ray/api/function/RayFunc4.java | 2 +- .../java/io/ray/api/function/RayFunc5.java | 2 +- .../java/io/ray/api/function/RayFunc6.java | 2 +- .../java/io/ray/api/function/RayFuncR.java | 10 + .../ray/api/options/ActorCreationOptions.java | 57 +- .../java/io/ray/api/options/CallOptions.java | 28 +- .../util/generator/RayCallGenerator.java | 125 +- .../util/generator/RayFuncGenerator.java | 2 +- .../java/io/ray/benchmark/ActorPressTest.java | 8 +- .../io/ray/benchmark/MaxPressureTest.java | 2 +- .../io/ray/benchmark/MicroBenchmarks.java | 2 +- .../benchmark/RateLimiterPressureTest.java | 2 +- .../io/ray/benchmark/RayBenchmarkTest.java | 2 +- .../io/ray/benchmark/SingleLatencyTest.java | 2 +- .../io/ray/test/ActorConcurrentCallTest.java | 15 +- .../java/io/ray/test/ActorRestartTest.java | 34 +- .../src/main/java/io/ray/test/ActorTest.java | 41 +- .../ray/test/CrossLanguageInvocationTest.java | 58 +- .../java/io/ray/test/DynamicResourceTest.java | 8 +- .../main/java/io/ray/test/FailureTest.java | 22 +- .../main/java/io/ray/test/HelloWorldTest.java | 6 +- .../main/java/io/ray/test/KillActorTest.java | 21 +- .../io/ray/test/MultiLanguageClusterTest.java | 2 +- .../java/io/ray/test/MultiThreadingTest.java | 33 +- .../main/java/io/ray/test/PlasmaFreeTest.java | 4 +- .../main/java/io/ray/test/RayCallTest.java | 43 +- .../java/io/ray/test/RaySerializerTest.java | 4 +- .../java/io/ray/test/RayletConfigTest.java | 4 +- .../java/io/ray/test/RedisPasswordTest.java | 2 +- .../io/ray/test/ResourcesManagementTest.java | 33 +- .../java/io/ray/test/RuntimeContextTest.java | 4 +- .../io/ray/test/SingleProcessModeTest.java | 6 +- .../src/main/java/io/ray/test/StressTest.java | 14 +- .../src/main/java/io/ray/test/TestUtils.java | 2 +- .../src/main/java/io/ray/test/WaitTest.java | 6 +- .../io/ray/test/WorkerJvmOptionsTest.java | 12 +- .../main/java/io/ray/exercise/Exercise01.java | 4 +- .../main/java/io/ray/exercise/Exercise02.java | 6 +- .../main/java/io/ray/exercise/Exercise03.java | 4 +- .../main/java/io/ray/exercise/Exercise04.java | 6 +- .../main/java/io/ray/exercise/Exercise05.java | 8 +- .../runtime/client/JobClientImpl.java | 14 +- .../controller/WorkerLifecycleController.java | 18 +- .../runtime/rpc/RemoteCallWorker.java | 11 +- .../streamingqueue/StreamingQueueTest.java | 25 +- .../runtime/streamingqueue/Worker.java | 4 +- 64 files changed, 1854 insertions(+), 3394 deletions(-) create mode 100644 java/api/src/main/java/io/ray/api/call/ActorCreator.java create mode 100644 java/api/src/main/java/io/ray/api/call/ActorTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/BaseActorCreator.java create mode 100644 java/api/src/main/java/io/ray/api/call/BaseTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/PyActorCreator.java create mode 100644 java/api/src/main/java/io/ray/api/call/PyActorTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/PyTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/TaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/VoidActorTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/call/VoidTaskCaller.java create mode 100644 java/api/src/main/java/io/ray/api/function/RayFuncR.java diff --git a/java/api/src/main/java/io/ray/api/ActorCall.java b/java/api/src/main/java/io/ray/api/ActorCall.java index f8cbb5fa6..06cf3bd93 100644 --- a/java/api/src/main/java/io/ray/api/ActorCall.java +++ b/java/api/src/main/java/io/ray/api/ActorCall.java @@ -2,6 +2,8 @@ package io.ray.api; +import io.ray.api.call.ActorTaskCaller; +import io.ray.api.call.VoidActorTaskCaller; import io.ray.api.function.RayFunc1; import io.ray.api.function.RayFunc2; import io.ray.api.function.RayFunc3; @@ -18,637 +20,636 @@ import io.ray.api.function.RayFuncVoid6; /** * This class provides type-safe interfaces for remote actor calls. **/ -@SuppressWarnings({"rawtypes", "unchecked"}) interface ActorCall { - default ObjectRef call(RayFunc1 f) { + default ActorTaskCaller task(RayFunc1 f) { Object[] args = new Object[]{}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid1 f) { + default VoidActorTaskCaller task(RayFuncVoid1 f) { Object[] args = new Object[]{}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc2 f, T0 t0) { + default ActorTaskCaller task(RayFunc2 f, T0 t0) { Object[] args = new Object[]{t0}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc2 f, ObjectRef t0) { + default ActorTaskCaller task(RayFunc2 f, ObjectRef t0) { Object[] args = new Object[]{t0}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid2 f, T0 t0) { + default VoidActorTaskCaller task(RayFuncVoid2 f, T0 t0) { Object[] args = new Object[]{t0}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid2 f, ObjectRef t0) { + default VoidActorTaskCaller task(RayFuncVoid2 f, ObjectRef t0) { Object[] args = new Object[]{t0}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc3 f, T0 t0, T1 t1) { + default ActorTaskCaller task(RayFunc3 f, T0 t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc3 f, T0 t0, ObjectRef t1) { + default ActorTaskCaller task(RayFunc3 f, T0 t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc3 f, ObjectRef t0, T1 t1) { + default ActorTaskCaller task(RayFunc3 f, ObjectRef t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc3 f, ObjectRef t0, ObjectRef t1) { + default ActorTaskCaller task(RayFunc3 f, ObjectRef t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid3 f, T0 t0, T1 t1) { + default VoidActorTaskCaller task(RayFuncVoid3 f, T0 t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid3 f, T0 t0, ObjectRef t1) { + default VoidActorTaskCaller task(RayFuncVoid3 f, T0 t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid3 f, ObjectRef t0, T1 t1) { + default VoidActorTaskCaller task(RayFuncVoid3 f, ObjectRef t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1) { + default VoidActorTaskCaller task(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, T0 t0, T1 t1, T2 t2) { + default ActorTaskCaller task(RayFunc4 f, T0 t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2) { + default ActorTaskCaller task(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2) { + default ActorTaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2) { + default ActorTaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2) { + default ActorTaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2) { + default ActorTaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2) { + default ActorTaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { + default ActorTaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { + default VoidActorTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + default ActorTaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + default VoidActorTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default ActorTaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().callActor((ActorHandle) this, f, args); + return new ActorTaskCaller<>((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } - default void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + default VoidActorTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().callActor((ActorHandle) this, f, args); + return new VoidActorTaskCaller((ActorHandle) this, f, args); } } diff --git a/java/api/src/main/java/io/ray/api/PyActorCall.java b/java/api/src/main/java/io/ray/api/PyActorCall.java index 9d812b633..1d712fd3d 100644 --- a/java/api/src/main/java/io/ray/api/PyActorCall.java +++ b/java/api/src/main/java/io/ray/api/PyActorCall.java @@ -2,42 +2,42 @@ package io.ray.api; +import io.ray.api.call.PyActorTaskCaller; import io.ray.api.function.PyActorMethod; /** * This class provides type-safe interfaces for remote actor calls. **/ -@SuppressWarnings({"rawtypes", "unchecked"}) interface PyActorCall { - default ObjectRef call(PyActorMethod pyActorMethod) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod) { Object[] args = new Object[]{}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } - default ObjectRef call(PyActorMethod pyActorMethod, Object obj0) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod, Object obj0) { Object[] args = new Object[]{obj0}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } - default ObjectRef call(PyActorMethod pyActorMethod, Object obj0, Object obj1) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod, Object obj0, Object obj1) { Object[] args = new Object[]{obj0, obj1}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } - default ObjectRef call(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2) { Object[] args = new Object[]{obj0, obj1, obj2}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } - default ObjectRef call(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2, Object obj3) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2, Object obj3) { Object[] args = new Object[]{obj0, obj1, obj2, obj3}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } - default ObjectRef call(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { + default PyActorTaskCaller task(PyActorMethod pyActorMethod, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; - return Ray.internal().callActor((PyActorHandle)this, pyActorMethod, args); + return new PyActorTaskCaller<>((PyActorHandle)this, pyActorMethod, args); } } diff --git a/java/api/src/main/java/io/ray/api/RayCall.java b/java/api/src/main/java/io/ray/api/RayCall.java index 182e55f84..281890a89 100644 --- a/java/api/src/main/java/io/ray/api/RayCall.java +++ b/java/api/src/main/java/io/ray/api/RayCall.java @@ -2,6 +2,11 @@ package io.ray.api; +import io.ray.api.call.ActorCreator; +import io.ray.api.call.PyActorCreator; +import io.ray.api.call.PyTaskCaller; +import io.ray.api.call.TaskCaller; +import io.ray.api.call.VoidTaskCaller; import io.ray.api.function.PyActorClass; import io.ray.api.function.PyRemoteFunction; import io.ray.api.function.RayFunc0; @@ -18,3971 +23,1993 @@ import io.ray.api.function.RayFuncVoid3; import io.ray.api.function.RayFuncVoid4; import io.ray.api.function.RayFuncVoid5; import io.ray.api.function.RayFuncVoid6; -import io.ray.api.options.ActorCreationOptions; -import io.ray.api.options.CallOptions; /** * This class provides type-safe interfaces for `Ray.call` and `Ray.createActor`. **/ -@SuppressWarnings({"rawtypes", "unchecked"}) class RayCall { // ======================================= // Methods for remote function invocation. // ======================================= - public static ObjectRef call(RayFunc0 f) { + public static TaskCaller task(RayFunc0 f) { Object[] args = new Object[]{}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc0 f, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid0 f) { Object[] args = new Object[]{}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid0 f) { - Object[] args = new Object[]{}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid0 f, CallOptions options) { - Object[] args = new Object[]{}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc1 f, T0 t0) { + public static TaskCaller task(RayFunc1 f, T0 t0) { Object[] args = new Object[]{t0}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc1 f, ObjectRef t0) { + public static TaskCaller task(RayFunc1 f, ObjectRef t0) { Object[] args = new Object[]{t0}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc1 f, T0 t0, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid1 f, T0 t0) { Object[] args = new Object[]{t0}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc1 f, ObjectRef t0, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid1 f, ObjectRef t0) { Object[] args = new Object[]{t0}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid1 f, T0 t0) { - Object[] args = new Object[]{t0}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid1 f, ObjectRef t0) { - Object[] args = new Object[]{t0}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid1 f, T0 t0, CallOptions options) { - Object[] args = new Object[]{t0}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid1 f, ObjectRef t0, CallOptions options) { - Object[] args = new Object[]{t0}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc2 f, T0 t0, T1 t1) { + public static TaskCaller task(RayFunc2 f, T0 t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc2 f, T0 t0, ObjectRef t1) { + public static TaskCaller task(RayFunc2 f, T0 t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc2 f, ObjectRef t0, T1 t1) { + public static TaskCaller task(RayFunc2 f, ObjectRef t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc2 f, ObjectRef t0, ObjectRef t1) { + public static TaskCaller task(RayFunc2 f, ObjectRef t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc2 f, T0 t0, T1 t1, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid2 f, T0 t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc2 f, T0 t0, ObjectRef t1, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid2 f, T0 t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc2 f, ObjectRef t0, T1 t1, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid2 f, ObjectRef t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc2 f, ObjectRef t0, ObjectRef t1, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid2 f, ObjectRef t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid2 f, T0 t0, T1 t1) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid2 f, T0 t0, ObjectRef t1) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid2 f, ObjectRef t0, T1 t1) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid2 f, ObjectRef t0, ObjectRef t1) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid2 f, T0 t0, T1 t1, CallOptions options) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid2 f, T0 t0, ObjectRef t1, CallOptions options) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid2 f, ObjectRef t0, T1 t1, CallOptions options) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid2 f, ObjectRef t0, ObjectRef t1, CallOptions options) { - Object[] args = new Object[]{t0, t1}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc3 f, T0 t0, T1 t1, T2 t2) { + public static TaskCaller task(RayFunc3 f, T0 t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2) { + public static TaskCaller task(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2) { + public static TaskCaller task(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2) { + public static TaskCaller task(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2) { + public static TaskCaller task(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2) { + public static TaskCaller task(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2) { + public static TaskCaller task(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { + public static TaskCaller task(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, T1 t1, T2 t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, T0 t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, T0 t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, T0 t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, T0 t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, ObjectRef t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, ObjectRef t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid3 f, T0 t0, T1 t1, T2 t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, T0 t0, T1 t1, ObjectRef t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, T0 t0, ObjectRef t1, T2 t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, T0 t0, ObjectRef t1, ObjectRef t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, T1 t1, T2 t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, T1 t1, ObjectRef t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, T2 t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid3 f, T0 t0, T1 t1, T2 t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, T0 t0, T1 t1, ObjectRef t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, T0 t0, ObjectRef t1, T2 t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, T0 t0, ObjectRef t1, ObjectRef t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, T1 t1, T2 t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, T1 t1, ObjectRef t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, T2 t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + public static TaskCaller task(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static ObjectRef call(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, null); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().call(f, args, options); - } - - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static TaskCaller task(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, null); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); - } - - public static ObjectRef call(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { + public static TaskCaller task(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, null); + return new TaskCaller<>(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } - public static void call(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, CallOptions options) { + public static VoidTaskCaller task(RayFuncVoid6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - Ray.internal().call(f, args, options); + return new VoidTaskCaller(f, args); } // =========================== // Methods for actor creation. // =========================== - public static ActorHandle createActor(RayFunc0 f) { + public static ActorCreator actor(RayFunc0 f) { Object[] args = new Object[]{}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc0 f, ActorCreationOptions options) { - Object[] args = new Object[]{}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc1 f, T0 t0) { + public static ActorCreator actor(RayFunc1 f, T0 t0) { Object[] args = new Object[]{t0}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc1 f, ObjectRef t0) { + public static ActorCreator actor(RayFunc1 f, ObjectRef t0) { Object[] args = new Object[]{t0}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc1 f, T0 t0, ActorCreationOptions options) { - Object[] args = new Object[]{t0}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc1 f, ObjectRef t0, ActorCreationOptions options) { - Object[] args = new Object[]{t0}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc2 f, T0 t0, T1 t1) { + public static ActorCreator actor(RayFunc2 f, T0 t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc2 f, T0 t0, ObjectRef t1) { + public static ActorCreator actor(RayFunc2 f, T0 t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc2 f, ObjectRef t0, T1 t1) { + public static ActorCreator actor(RayFunc2 f, ObjectRef t0, T1 t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc2 f, ObjectRef t0, ObjectRef t1) { + public static ActorCreator actor(RayFunc2 f, ObjectRef t0, ObjectRef t1) { Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc2 f, T0 t0, T1 t1, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc2 f, T0 t0, ObjectRef t1, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc2 f, ObjectRef t0, T1 t1, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc2 f, ObjectRef t0, ObjectRef t1, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, T0 t0, T1 t1, T2 t2) { + public static ActorCreator actor(RayFunc3 f, T0 t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2) { + public static ActorCreator actor(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2) { + public static ActorCreator actor(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2) { + public static ActorCreator actor(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2) { + public static ActorCreator actor(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2) { + public static ActorCreator actor(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2) { + public static ActorCreator actor(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { + public static ActorCreator actor(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2) { Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc3 f, T0 t0, T1 t1, T2 t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, T0 t0, T1 t1, ObjectRef t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, T0 t0, ObjectRef t1, T2 t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, T0 t0, ObjectRef t1, ObjectRef t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, T1 t1, T2 t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, T1 t1, ObjectRef t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, ObjectRef t1, T2 t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc3 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { + public static ActorCreator actor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3) { Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, T2 t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc4 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { + public static ActorCreator actor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4) { Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, null); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc5 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ActorCreationOptions options) { - Object[] args = new Object[]{t0, t1, t2, t3, t4}; - return Ray.internal().createActor(f, args, options); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { - Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, null); - } - - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, T0 t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, T1 t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, T2 t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, T3 t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, T4 t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, T5 t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } - public static ActorHandle createActor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5, ActorCreationOptions options) { + public static ActorCreator actor(RayFunc6 f, ObjectRef t0, ObjectRef t1, ObjectRef t2, ObjectRef t3, ObjectRef t4, ObjectRef t5) { Object[] args = new Object[]{t0, t1, t2, t3, t4, t5}; - return Ray.internal().createActor(f, args, options); + return new ActorCreator<>(f, args); } // =========================== // Cross-language methods. // =========================== - public static ObjectRef call(PyRemoteFunction pyRemoteFunction) { + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction) { Object[] args = new Object[]{}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyTaskCaller<>(pyRemoteFunction, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, CallOptions options) { + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0) { + Object[] args = new Object[]{obj0}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1) { + Object[] args = new Object[]{obj0, obj1}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2) { + Object[] args = new Object[]{obj0, obj1, obj2}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3) { + Object[] args = new Object[]{obj0, obj1, obj2, obj3}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { + Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyTaskCaller task(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5) { + Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4, obj5}; + return new PyTaskCaller<>(pyRemoteFunction, args); + } + + public static PyActorCreator actor(PyActorClass pyActorClass) { Object[] args = new Object[]{}; - return Ray.internal().call(pyRemoteFunction, args, options); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0) { Object[] args = new Object[]{obj0}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, CallOptions options) { - Object[] args = new Object[]{obj0}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0, Object obj1) { Object[] args = new Object[]{obj0, obj1}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, CallOptions options) { - Object[] args = new Object[]{obj0, obj1}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2) { Object[] args = new Object[]{obj0, obj1, obj2}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, CallOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3) { Object[] args = new Object[]{obj0, obj1, obj2, obj3}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, CallOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; - return Ray.internal().call(pyRemoteFunction, args, null); + return new PyActorCreator(pyActorClass, args); } - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, CallOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5) { + public static PyActorCreator actor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5) { Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4, obj5}; - return Ray.internal().call(pyRemoteFunction, args, null); - } - - public static ObjectRef call(PyRemoteFunction pyRemoteFunction, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5, CallOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4, obj5}; - return Ray.internal().call(pyRemoteFunction, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass) { - Object[] args = new Object[]{}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, ActorCreationOptions options) { - Object[] args = new Object[]{}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0) { - Object[] args = new Object[]{obj0}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, ActorCreationOptions options) { - Object[] args = new Object[]{obj0}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1) { - Object[] args = new Object[]{obj0, obj1}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, ActorCreationOptions options) { - Object[] args = new Object[]{obj0, obj1}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2) { - Object[] args = new Object[]{obj0, obj1, obj2}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, ActorCreationOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, ActorCreationOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, ActorCreationOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4}; - return Ray.internal().createActor(pyActorClass, args, options); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4, obj5}; - return Ray.internal().createActor(pyActorClass, args, null); - } - - public static PyActorHandle createActor(PyActorClass pyActorClass, Object obj0, Object obj1, Object obj2, Object obj3, Object obj4, Object obj5, ActorCreationOptions options) { - Object[] args = new Object[]{obj0, obj1, obj2, obj3, obj4, obj5}; - return Ray.internal().createActor(pyActorClass, args, options); + return new PyActorCreator(pyActorClass, args); } } diff --git a/java/api/src/main/java/io/ray/api/call/ActorCreator.java b/java/api/src/main/java/io/ray/api/call/ActorCreator.java new file mode 100644 index 000000000..f6f9da8fe --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/ActorCreator.java @@ -0,0 +1,38 @@ +package io.ray.api.call; + +import io.ray.api.ActorHandle; +import io.ray.api.Ray; +import io.ray.api.function.RayFuncR; + +/** + * A helper to create java actor. + * + * @param The type of the concrete actor class. + */ +public class ActorCreator extends BaseActorCreator> { + private final RayFuncR func; + private final Object[] args; + + public ActorCreator(RayFuncR func, Object[] args) { + this.func = func; + this.args = args; + } + + /** + * @see io.ray.api.options.ActorCreationOptions.Builder#setJvmOptions(java.lang.String) + */ + public ActorCreator setJvmOptions(String jvmOptions) { + builder.setJvmOptions(jvmOptions); + return this; + } + + /** + * Create a java actor remotely and return a handle to the created actor. + * + * @return a handle to the created java actor. + */ + public ActorHandle remote() { + return Ray.internal().createActor(func, args, buildOptions()); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/ActorTaskCaller.java b/java/api/src/main/java/io/ray/api/call/ActorTaskCaller.java new file mode 100644 index 000000000..8ec64a958 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/ActorTaskCaller.java @@ -0,0 +1,35 @@ +package io.ray.api.call; + +import io.ray.api.ActorHandle; +import io.ray.api.ObjectRef; +import io.ray.api.Ray; +import io.ray.api.function.RayFuncR; + +/** + * A helper to call java actor method. + * + * @param The type of the java actor method return value + */ +public class ActorTaskCaller { + private final ActorHandle actor; + private final RayFuncR func; + private final Object[] args; + + public ActorTaskCaller(ActorHandle actor, RayFuncR func, Object[] args) { + this.actor = actor; + this.func = func; + this.args = args; + } + + /** + * Execute an java actor method remotely and return an object reference to the result object in + * the object store. + * + * @return an object reference to an object in the object store. + */ + @SuppressWarnings("unchecked") + public ObjectRef remote() { + return Ray.internal().callActor(actor, func, args); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/BaseActorCreator.java b/java/api/src/main/java/io/ray/api/call/BaseActorCreator.java new file mode 100644 index 000000000..a924243a3 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/BaseActorCreator.java @@ -0,0 +1,82 @@ +package io.ray.api.call; + +import io.ray.api.options.ActorCreationOptions; +import java.util.Map; + +/** + * Base helper to create actor. + * + * @param The type of the concrete actor creator + */ +public class BaseActorCreator { + protected ActorCreationOptions.Builder builder = new ActorCreationOptions.Builder(); + + /** + * Set a custom resource requirement to reserve for the lifetime of this actor. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resourceName resource name + * @param resourceQuantity resource quantity + * @return self + * @see ActorCreationOptions.Builder#setResource(java.lang.String, java.lang.Double) + */ + public T setResource(String resourceName, Double resourceQuantity) { + builder.setResource(resourceName, resourceQuantity); + return self(); + } + + /** + * Set custom resource requirements to reserve for the lifetime of this actor. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resources requirements for multiple resources. + * @return self + * @see BaseActorCreator#setResources(java.util.Map) + */ + public T setResources(Map resources) { + builder.setResources(resources); + return self(); + } + + /** + * This specifies the maximum number of times that the actor should be restarted when it dies + * unexpectedly. The minimum valid value is 0 (default), which indicates that the actor doesn't + * need to be restarted. A value of -1 indicates that an actor should be restarted indefinitely. + * + * @param maxRestarts max number of actor restarts + * @return self + * @see ActorCreationOptions.Builder#setMaxRestarts(int) + */ + public T setMaxRestarts(int maxRestarts) { + builder.setMaxRestarts(maxRestarts); + return self(); + } + + /** + /** + * Set the max number of concurrent calls to allow for this actor. + * + * The max concurrency defaults to 1 for threaded execution. + * Note that the execution order is not guaranteed when max_concurrency > 1. + * + * @param maxConcurrency The max number of concurrent calls to allow for this actor. + * @return self + * @see ActorCreationOptions.Builder#setMaxConcurrency(int) + */ + public T setMaxConcurrency(int maxConcurrency) { + builder.setMaxConcurrency(maxConcurrency); + return self(); + } + + @SuppressWarnings("unchecked") + private T self() { + return (T) this; + } + + protected ActorCreationOptions buildOptions() { + return builder.build(); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/BaseTaskCaller.java b/java/api/src/main/java/io/ray/api/call/BaseTaskCaller.java new file mode 100644 index 000000000..0da239ca4 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/BaseTaskCaller.java @@ -0,0 +1,52 @@ +package io.ray.api.call; + +import io.ray.api.options.CallOptions; +import java.util.Map; + +/** + * Base helper to call remote function. + * + * @param The type of the concrete task caller + */ +public class BaseTaskCaller> { + private CallOptions.Builder builder = new CallOptions.Builder(); + + /** + * Set a custom resource requirement for resource {@code name}. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param name resource name + * @param value resource capacity + * @return self + * @see CallOptions.Builder#setResource(java.lang.String, java.lang.Double) + */ + public T setResource(String name, Double value) { + builder.setResource(name, value); + return self(); + } + + /** + * Set custom requirements for multiple resources. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resources requirements for multiple resources. + * @return self + * @see CallOptions.Builder#setResources(java.util.Map) + */ + public T setResources(Map resources) { + builder.setResources(resources); + return self(); + } + + @SuppressWarnings("unchecked") + private T self() { + return (T) this; + } + + protected CallOptions buildOptions() { + return builder.build(); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/PyActorCreator.java b/java/api/src/main/java/io/ray/api/call/PyActorCreator.java new file mode 100644 index 000000000..4242b68de --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/PyActorCreator.java @@ -0,0 +1,27 @@ +package io.ray.api.call; + +import io.ray.api.PyActorHandle; +import io.ray.api.Ray; +import io.ray.api.function.PyActorClass; + +/** + * A helper to create python actor. + */ +public class PyActorCreator extends BaseActorCreator { + private final PyActorClass pyActorClass; + private final Object[] args; + + public PyActorCreator(PyActorClass pyActorClass, Object[] args) { + this.pyActorClass = pyActorClass; + this.args = args; + } + + /** + * Create a python actor remotely and return a handle to the created actor. + * + * @return a handle to the created python actor. + */ + public PyActorHandle remote() { + return Ray.internal().createActor(pyActorClass, args, buildOptions()); + } +} diff --git a/java/api/src/main/java/io/ray/api/call/PyActorTaskCaller.java b/java/api/src/main/java/io/ray/api/call/PyActorTaskCaller.java new file mode 100644 index 000000000..bbe79d134 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/PyActorTaskCaller.java @@ -0,0 +1,35 @@ +package io.ray.api.call; + +import io.ray.api.ObjectRef; +import io.ray.api.PyActorHandle; +import io.ray.api.Ray; +import io.ray.api.function.PyActorMethod; + +/** + * A helper to call python actor method. + * + * @param The type of the python actor method return value + */ +public class PyActorTaskCaller { + private final PyActorHandle actor; + private final PyActorMethod method; + private final Object[] args; + + public PyActorTaskCaller(PyActorHandle actor, PyActorMethod method, Object[] args) { + this.actor = actor; + this.method = method; + this.args = args; + } + + /** + * Execute a python actor method remotely and return an object reference to the result object in + * the object store. + * + * @return an object reference to an object in the object store. + */ + @SuppressWarnings("unchecked") + public ObjectRef remote() { + return Ray.internal().callActor(actor, method, args); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/PyTaskCaller.java b/java/api/src/main/java/io/ray/api/call/PyTaskCaller.java new file mode 100644 index 000000000..aecb56854 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/PyTaskCaller.java @@ -0,0 +1,32 @@ +package io.ray.api.call; + +import io.ray.api.ObjectRef; +import io.ray.api.Ray; +import io.ray.api.function.PyRemoteFunction; + +/** + * A helper to call python remote function. + * + * @param The type of the python function return value + */ +public class PyTaskCaller extends BaseTaskCaller> { + private final PyRemoteFunction func; + private final Object[] args; + + public PyTaskCaller(PyRemoteFunction func, Object[] args) { + this.func = func; + this.args = args; + } + + /** + * Execute a python function remotely and return an object reference to the result object in the + * object store. + * + * @return an object reference to an object in the object store. + */ + @SuppressWarnings("unchecked") + public ObjectRef remote() { + return Ray.internal().call(func, args, buildOptions()); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/TaskCaller.java b/java/api/src/main/java/io/ray/api/call/TaskCaller.java new file mode 100644 index 000000000..80dacec2d --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/TaskCaller.java @@ -0,0 +1,31 @@ +package io.ray.api.call; + +import io.ray.api.ObjectRef; +import io.ray.api.Ray; +import io.ray.api.function.RayFuncR; + +/** + * A helper to call java remote function. + * + * @param The type of the java remote function return value + */ +public class TaskCaller extends BaseTaskCaller> { + private final RayFuncR func; + private final Object[] args; + + public TaskCaller(RayFuncR func, Object[] args) { + this.func = func; + this.args = args; + } + + /** + * Execute a java function remotely and return an object reference to the result object in the + * object store. + * + * @return an object reference to an object in the object store. + */ + @SuppressWarnings("unchecked") + public ObjectRef remote() { + return Ray.internal().call(func, args, buildOptions()); + } +} diff --git a/java/api/src/main/java/io/ray/api/call/VoidActorTaskCaller.java b/java/api/src/main/java/io/ray/api/call/VoidActorTaskCaller.java new file mode 100644 index 000000000..033b37187 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/VoidActorTaskCaller.java @@ -0,0 +1,28 @@ +package io.ray.api.call; + +import io.ray.api.ActorHandle; +import io.ray.api.Ray; +import io.ray.api.function.RayFuncVoid; + +/** + * A helper to call java actor method which doesn't have a return value. + */ +public class VoidActorTaskCaller { + private final ActorHandle actor; + private final RayFuncVoid func; + private final Object[] args; + + public VoidActorTaskCaller(ActorHandle actor, RayFuncVoid func, Object[] args) { + this.actor = actor; + this.func = func; + this.args = args; + } + + /** + * Execute a function remotely. + */ + public void remote() { + Ray.internal().callActor(actor, func, args); + } + +} diff --git a/java/api/src/main/java/io/ray/api/call/VoidTaskCaller.java b/java/api/src/main/java/io/ray/api/call/VoidTaskCaller.java new file mode 100644 index 000000000..feca5f1f1 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/call/VoidTaskCaller.java @@ -0,0 +1,25 @@ +package io.ray.api.call; + +import io.ray.api.Ray; +import io.ray.api.function.RayFuncVoid; + +/** + * A helper to call java remote function which doesn't have a return value. + */ +public class VoidTaskCaller extends BaseTaskCaller { + private final RayFuncVoid func; + private final Object[] args; + + public VoidTaskCaller(RayFuncVoid func, Object[] args) { + this.func = func; + this.args = args; + } + + /** + * Execute a function remotely. + */ + public void remote() { + Ray.internal().call(func, args, buildOptions()); + } + +} diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc.java b/java/api/src/main/java/io/ray/api/function/RayFunc.java index c0f8d1f47..0bf6109d1 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc.java @@ -3,8 +3,7 @@ package io.ray.api.function; import java.io.Serializable; /** - * Interface of all Ray remote functions. + * Base interface of all Ray remote java functions. */ public interface RayFunc extends Serializable { - } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc0.java b/java/api/src/main/java/io/ray/api/function/RayFunc0.java index 52b4377ee..b1f979739 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc0.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc0.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 0 parameter. */ @FunctionalInterface -public interface RayFunc0 extends RayFunc { +public interface RayFunc0 extends RayFuncR { R apply() throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc1.java b/java/api/src/main/java/io/ray/api/function/RayFunc1.java index 90e33a23e..903a3349c 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc1.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc1.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 1 parameter. */ @FunctionalInterface -public interface RayFunc1 extends RayFunc { +public interface RayFunc1 extends RayFuncR { R apply(T0 t0) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc2.java b/java/api/src/main/java/io/ray/api/function/RayFunc2.java index a26027a5a..8a0cfbf70 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc2.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc2.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 2 parameters. */ @FunctionalInterface -public interface RayFunc2 extends RayFunc { +public interface RayFunc2 extends RayFuncR { R apply(T0 t0, T1 t1) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc3.java b/java/api/src/main/java/io/ray/api/function/RayFunc3.java index ce7146a41..4b878f71a 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc3.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc3.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 3 parameters. */ @FunctionalInterface -public interface RayFunc3 extends RayFunc { +public interface RayFunc3 extends RayFuncR { R apply(T0 t0, T1 t1, T2 t2) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc4.java b/java/api/src/main/java/io/ray/api/function/RayFunc4.java index eb0549a93..41c2af3d2 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc4.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc4.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 4 parameters. */ @FunctionalInterface -public interface RayFunc4 extends RayFunc { +public interface RayFunc4 extends RayFuncR { R apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc5.java b/java/api/src/main/java/io/ray/api/function/RayFunc5.java index bf95b003b..90ebb7b43 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc5.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc5.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 5 parameters. */ @FunctionalInterface -public interface RayFunc5 extends RayFunc { +public interface RayFunc5 extends RayFuncR { R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFunc6.java b/java/api/src/main/java/io/ray/api/function/RayFunc6.java index 08337a813..e4a5b21eb 100644 --- a/java/api/src/main/java/io/ray/api/function/RayFunc6.java +++ b/java/api/src/main/java/io/ray/api/function/RayFunc6.java @@ -6,7 +6,7 @@ package io.ray.api.function; * Functional interface for a remote function that has 6 parameters. */ @FunctionalInterface -public interface RayFunc6 extends RayFunc { +public interface RayFunc6 extends RayFuncR { R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Exception; } diff --git a/java/api/src/main/java/io/ray/api/function/RayFuncR.java b/java/api/src/main/java/io/ray/api/function/RayFuncR.java new file mode 100644 index 000000000..7f2bf5436 --- /dev/null +++ b/java/api/src/main/java/io/ray/api/function/RayFuncR.java @@ -0,0 +1,10 @@ +package io.ray.api.function; + +/** + * Interface of all Ray remote functions which have a return value + * + * @param Type of function return value + */ +public interface RayFuncR extends RayFunc { + +} diff --git a/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java b/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java index 68881a050..53be5c6b4 100644 --- a/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java +++ b/java/api/src/main/java/io/ray/api/options/ActorCreationOptions.java @@ -31,25 +31,68 @@ public class ActorCreationOptions extends BaseTaskOptions { private String jvmOptions = null; private int maxConcurrency = 1; - public Builder setResources(Map resources) { - this.resources = resources; + /** + * Set a custom resource requirement to reserve for the lifetime of this actor. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resourceName resource name + * @param resourceQuantity resource quantity + * @return self + */ + public Builder setResource(String resourceName, Double resourceQuantity) { + this.resources.put(resourceName, resourceQuantity); return this; } + /** + * Set custom resource requirements to reserve for the lifetime of this actor. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resources requirements for multiple resources. + * @return self + */ + public Builder setResources(Map resources) { + this.resources.putAll(resources); + return this; + } + + /** + * This specifies the maximum number of times that the actor should be restarted when it dies + * unexpectedly. The minimum valid value is 0 (default), which indicates that the actor doesn't + * need to be restarted. A value of -1 indicates that an actor should be restarted indefinitely. + * + * @param maxRestarts max number of actor restarts + * @return self + */ public Builder setMaxRestarts(int maxRestarts) { this.maxRestarts = maxRestarts; return this; } + /** + * Set the JVM options for the Java worker that this actor is running in. + * + * Note, if this is set, this actor won't share Java worker with other actors or tasks. + * + * @param jvmOptions JVM options for the Java worker that this actor is running in. + * @return self + */ public Builder setJvmOptions(String jvmOptions) { this.jvmOptions = jvmOptions; return this; } - // The max number of concurrent calls to allow for this actor. - // - // The max concurrency defaults to 1 for threaded execution. - // Note that the execution order is not guaranteed when max_concurrency > 1. + /** + * Set the max number of concurrent calls to allow for this actor. + * + * The max concurrency defaults to 1 for threaded execution. + * Note that the execution order is not guaranteed when max_concurrency > 1. + * + * @param maxConcurrency The max number of concurrent calls to allow for this actor. + * @return self + */ public Builder setMaxConcurrency(int maxConcurrency) { if (maxConcurrency <= 0) { throw new IllegalArgumentException("maxConcurrency must be greater than 0."); @@ -59,7 +102,7 @@ public class ActorCreationOptions extends BaseTaskOptions { return this; } - public ActorCreationOptions createActorCreationOptions() { + public ActorCreationOptions build() { return new ActorCreationOptions( resources, maxRestarts, jvmOptions, maxConcurrency); } diff --git a/java/api/src/main/java/io/ray/api/options/CallOptions.java b/java/api/src/main/java/io/ray/api/options/CallOptions.java index a9a3a6faa..7f086a267 100644 --- a/java/api/src/main/java/io/ray/api/options/CallOptions.java +++ b/java/api/src/main/java/io/ray/api/options/CallOptions.java @@ -19,12 +19,34 @@ public class CallOptions extends BaseTaskOptions { private Map resources = new HashMap<>(); - public Builder setResources(Map resources) { - this.resources = resources; + /** + * Set a custom resource requirement for resource {@code name}. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param name resource name + * @param value resource capacity + * @return self + */ + public Builder setResource(String name, Double value) { + this.resources.put(name, value); return this; } - public CallOptions createCallOptions() { + /** + * Set custom requirements for multiple resources. + * This method can be called multiple times. If the same resource is set multiple times, + * the latest quantity will be used. + * + * @param resources requirements for multiple resources. + * @return self + */ + public Builder setResources(Map resources) { + this.resources.putAll(resources); + return this; + } + + public CallOptions build() { return new CallOptions(resources); } } diff --git a/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java index 5c4fcb759..9e5e6a018 100644 --- a/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayCallGenerator.java @@ -23,6 +23,11 @@ public class RayCallGenerator extends BaseGenerator { newLine(""); newLine("package io.ray.api;"); newLine(""); + newLine("import io.ray.api.call.ActorCreator;"); + newLine("import io.ray.api.call.PyActorCreator;"); + newLine("import io.ray.api.call.PyTaskCaller;"); + newLine("import io.ray.api.call.TaskCaller;"); + newLine("import io.ray.api.call.VoidTaskCaller;"); newLine("import io.ray.api.function.PyActorClass;"); newLine("import io.ray.api.function.PyRemoteFunction;"); for (int i = 0; i <= MAX_PARAMETERS; i++) { @@ -31,43 +36,35 @@ public class RayCallGenerator extends BaseGenerator { for (int i = 0; i <= MAX_PARAMETERS; i++) { newLine("import io.ray.api.function.RayFuncVoid" + i + ";"); } - newLine("import io.ray.api.options.ActorCreationOptions;"); - newLine("import io.ray.api.options.CallOptions;"); newLine(""); newLine("/**"); newLine(" * This class provides type-safe interfaces for `Ray.call` and `Ray.createActor`."); newLine(" **/"); - newLine("@SuppressWarnings({\"rawtypes\", \"unchecked\"})"); newLine("class RayCall {"); newLine(1, "// ======================================="); newLine(1, "// Methods for remote function invocation."); newLine(1, "// ======================================="); for (int i = 0; i <= MAX_PARAMETERS; i++) { - buildCalls(i, false, false, true, false); - buildCalls(i, false, false, true, true); - buildCalls(i, false, false, false, false); - buildCalls(i, false, false, false, true); + buildCalls(i, false, false, true); + buildCalls(i, false, false, false); } newLine(1, "// ==========================="); newLine(1, "// Methods for actor creation."); newLine(1, "// ==========================="); for (int i = 0; i <= MAX_PARAMETERS; i++) { - buildCalls(i, false, true, true, false); - buildCalls(i, false, true, true, true); + buildCalls(i, false, true, true); } newLine(1, "// ==========================="); newLine(1, "// Cross-language methods."); newLine(1, "// ==========================="); for (int i = 0; i <= MAX_PARAMETERS; i++) { - buildPyCalls(i, false, false, false); - buildPyCalls(i, false, false, true); + buildPyCalls(i, false, false); } for (int i = 0; i <= MAX_PARAMETERS; i++) { - buildPyCalls(i, false, true, false); - buildPyCalls(i, false, true, true); + buildPyCalls(i, false, true); } newLine("}"); return sb.toString(); @@ -83,6 +80,8 @@ public class RayCallGenerator extends BaseGenerator { newLine(""); newLine("package io.ray.api;"); newLine(""); + newLine("import io.ray.api.call.ActorTaskCaller;"); + newLine("import io.ray.api.call.VoidActorTaskCaller;"); for (int i = 1; i <= MAX_PARAMETERS; i++) { newLine("import io.ray.api.function.RayFunc" + i + ";"); } @@ -93,12 +92,11 @@ public class RayCallGenerator extends BaseGenerator { newLine("/**"); newLine(" * This class provides type-safe interfaces for remote actor calls."); newLine(" **/"); - newLine("@SuppressWarnings({\"rawtypes\", \"unchecked\"})"); newLine("interface ActorCall {"); newLine(""); for (int i = 0; i <= MAX_PARAMETERS - 1; i++) { - buildCalls(i, true, false, true, false); - buildCalls(i, true, false, false, false); + buildCalls(i, true, false, true); + buildCalls(i, true, false, false); } newLine("}"); return sb.toString(); @@ -114,16 +112,16 @@ public class RayCallGenerator extends BaseGenerator { newLine(""); newLine("package io.ray.api;"); newLine(""); + newLine("import io.ray.api.call.PyActorTaskCaller;"); newLine("import io.ray.api.function.PyActorMethod;"); newLine(""); newLine("/**"); newLine(" * This class provides type-safe interfaces for remote actor calls."); newLine(" **/"); - newLine("@SuppressWarnings({\"rawtypes\", \"unchecked\"})"); newLine("interface PyActorCall {"); newLine(""); for (int i = 0; i <= MAX_PARAMETERS - 1; i++) { - buildPyCalls(i, true, false, false); + buildPyCalls(i, true, false); } newLine("}"); return sb.toString(); @@ -139,11 +137,11 @@ public class RayCallGenerator extends BaseGenerator { * @param forActorCreation Build `Ray.createActor` when true, otherwise build `Ray.call`. */ private void buildCalls(int numParameters, boolean forActor, - boolean forActorCreation, boolean hasReturn, boolean hasOptionsParam) { + boolean forActorCreation, boolean hasReturn) { // Template of the generated function: // [modifiers] [genericTypes] [returnType] [callFunc]([argsDeclaration]) { // Objects[] args = new Object[]{[args]}; - // return Ray.internal().[callFunc](f[, getThis()], args[, options]); + // return new [Caller](func, args); // } String modifiers = forActor ? "default" : "public static"; @@ -170,9 +168,13 @@ public class RayCallGenerator extends BaseGenerator { // 2) Construct the `returnType` part. String returnType; if (forActorCreation) { - returnType = "ActorHandle"; + returnType = "ActorCreator"; } else { - returnType = hasReturn ? "ObjectRef" : "void"; + if (forActor) { + returnType = hasReturn ? "ActorTaskCaller" : "VoidActorTaskCaller"; + } else { + returnType = hasReturn ? "TaskCaller" : "VoidTaskCaller"; + } } // 3) Construct the `argsDeclaration` part. @@ -189,16 +191,21 @@ public class RayCallGenerator extends BaseGenerator { !forActor ? numParameters : numParameters + 1, rayFuncGenericTypes); - String callFunc = forActorCreation ? "createActor" : "call"; - String internalCallFunc = forActorCreation ? "createActor" : forActor ? "callActor" : "call"; + String callFunc = forActorCreation ? "actor" : "task"; + String caller; + if (forActorCreation) { + caller = "ActorCreator<>"; + } else { + if (forActor) { + caller = hasReturn ? "ActorTaskCaller<>" : "VoidActorTaskCaller"; + } else { + caller = hasReturn ? "TaskCaller<>" : "VoidTaskCaller"; + } + } // Enumerate all combinations of the parameters. for (String param : generateParameters(numParameters)) { String argsDeclaration = argsDeclarationPrefix + param; - if (hasOptionsParam) { - argsDeclaration += - forActorCreation ? "ActorCreationOptions options, " : "CallOptions options, "; - } // Trim trailing ", "; argsDeclaration = argsDeclaration.substring(0, argsDeclaration.length() - 2); // Print the first line (method signature). @@ -220,15 +227,13 @@ public class RayCallGenerator extends BaseGenerator { newLine(2, String.format("Object[] args = new Object[]{%s};", args)); // 5) Construct the third line. - String callFuncArgs = ""; + String ctrArgs = ""; if (forActor) { - callFuncArgs += "(ActorHandle) this, "; + ctrArgs += "(ActorHandle) this, "; } - callFuncArgs += "f, args, "; - callFuncArgs += forActor ? "" : hasOptionsParam ? "options, " : "null, "; - callFuncArgs = callFuncArgs.substring(0, callFuncArgs.length() - 2); - newLine(2, String.format("%sRay.internal().%s(%s);", - hasReturn ? "return " : "", internalCallFunc, callFuncArgs)); + ctrArgs += "f, args, "; + ctrArgs = ctrArgs.substring(0, ctrArgs.length() - 2); + newLine(2, String.format("return new %s(%s);", caller, ctrArgs)); newLine(1, "}"); newLine(""); } @@ -241,12 +246,9 @@ public class RayCallGenerator extends BaseGenerator { * @param numParameters the number of parameters * @param forActor Build `actor.call` when true, otherwise build `Ray.call`. * @param forActorCreation Build `Ray.createActor` when true, otherwise build `Ray.call`. - * @param hasOptionsParam Add ActorCreationOptions if forActorCreation is true; - * Add CallOptions if forActorCreation is false; - * No additional param if hasOptionsParam is false. */ private void buildPyCalls(int numParameters, boolean forActor, - boolean forActorCreation, boolean hasOptionsParam) { + boolean forActorCreation) { String modifiers = forActor ? "default" : "public static"; String argList = ""; @@ -278,43 +280,26 @@ public class RayCallGenerator extends BaseGenerator { paramPrefix += ", "; } - String optionsParam; - if (hasOptionsParam) { - optionsParam = forActorCreation ? ", ActorCreationOptions options" : ", CallOptions options"; - } else { - optionsParam = ""; - } - - String optionsArg; - if (forActor) { - optionsArg = ""; - } else { - if (hasOptionsParam) { - optionsArg = ", options"; - } else { - optionsArg = ", null"; - } - } - String genericType = forActorCreation ? "" : " "; - String returnType = !forActorCreation ? "ObjectRef" : "PyActorHandle"; - String funcName = forActorCreation ? "createActor" : "call"; - String internalCallFunc = forActorCreation ? "createActor" : - forActor ? "callActor" : "call"; + String returnType = forActorCreation ? "PyActorCreator" : + forActor ? "PyActorTaskCaller" : "PyTaskCaller"; + + String funcName = forActorCreation ? "actor" : "task"; + String caller = forActorCreation ? "PyActorCreator" : + forActor ? "PyActorTaskCaller<>" : "PyTaskCaller<>"; funcArgs += ", args"; // Method signature. newLine(1, String.format( - "%s%s %s %s(%s%s) {", modifiers, genericType, - returnType, funcName, paramPrefix + paramList, optionsParam + "%s%s %s %s(%s) {", modifiers, genericType, + returnType, funcName, paramPrefix + paramList )); // Method body. newLine(2, String.format("Object[] args = new Object[]{%s};", argList)); if (forActor) { - newLine(2, String.format("return Ray.internal().%s((PyActorHandle)this, %s%s);", - internalCallFunc, funcArgs, optionsArg)); + newLine(2, String.format("return new %s((PyActorHandle)this, %s);", + caller, funcArgs)); } else { - newLine(2, String.format("return Ray.internal().%s(%s%s);", - internalCallFunc, funcArgs, optionsArg)); + newLine(2, String.format("return new %s(%s);", caller, funcArgs)); } newLine(1, "}"); newLine(""); @@ -339,15 +324,15 @@ public class RayCallGenerator extends BaseGenerator { public static void main(String[] args) throws IOException { String path = System.getProperty("user.dir") - + "/api/src/main/java/io.ray/api/RayCall.java"; + + "/api/src/main/java/io/ray/api/RayCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generateRayCallDotJava(), Charset.defaultCharset()); path = System.getProperty("user.dir") - + "/api/src/main/java/io.ray/api/ActorCall.java"; + + "/api/src/main/java/io/ray/api/ActorCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generateActorCallDotJava(), Charset.defaultCharset()); path = System.getProperty("user.dir") - + "/api/src/main/java/io.ray/api/PyActorCall.java"; + + "/api/src/main/java/io/ray/api/PyActorCall.java"; FileUtils.write(new File(path), new RayCallGenerator().generatePyActorCallDotJava(), Charset.defaultCharset()); } diff --git a/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java index 12b1f6433..3567a8fe6 100644 --- a/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java +++ b/java/runtime/src/main/java/io/ray/runtime/util/generator/RayFuncGenerator.java @@ -44,7 +44,7 @@ public class RayFuncGenerator extends BaseGenerator { newLine("@FunctionalInterface"); String className = "RayFunc" + (hasReturn ? "" : "Void") + numParameters; newLine(String.format("public interface %s%s extends %s {", - className, genericTypes, hasReturn ? "RayFunc" : "RayFuncVoid")); + className, genericTypes, hasReturn ? "RayFuncR" : "RayFuncVoid")); newLine(""); indents(1); newLine(String.format("%s apply(%s) throws Exception;", hasReturn ? "R" : "void", paramList)); diff --git a/java/test/src/main/java/io/ray/benchmark/ActorPressTest.java b/java/test/src/main/java/io/ray/benchmark/ActorPressTest.java index f0cf4ae8d..3ffd1b365 100644 --- a/java/test/src/main/java/io/ray/benchmark/ActorPressTest.java +++ b/java/test/src/main/java/io/ray/benchmark/ActorPressTest.java @@ -10,7 +10,7 @@ public class ActorPressTest extends RayBenchmarkTest { @Test public void singleLatencyTest() { int times = 10; - ActorHandle adder = Ray.createActor(ActorPressTest.Adder::new); + ActorHandle adder = Ray.actor(ActorPressTest.Adder::new).remote(); super.singleLatencyTest(times, adder); } @@ -18,7 +18,7 @@ public class ActorPressTest extends RayBenchmarkTest { public void maxTest() { int clientNum = 2; int totalNum = 20; - ActorHandle adder = Ray.createActor(ActorPressTest.Adder::new); + ActorHandle adder = Ray.actor(ActorPressTest.Adder::new).remote(); PressureTestParameter pressureTestParameter = new PressureTestParameter(); pressureTestParameter.setClientNum(clientNum); pressureTestParameter.setTotalNum(totalNum); @@ -32,7 +32,7 @@ public class ActorPressTest extends RayBenchmarkTest { int clientNum = 2; int totalQps = 2; int duration = 3; - ActorHandle adder = Ray.createActor(ActorPressTest.Adder::new); + ActorHandle adder = Ray.actor(ActorPressTest.Adder::new).remote(); PressureTestParameter pressureTestParameter = new PressureTestParameter(); pressureTestParameter.setClientNum(clientNum); pressureTestParameter.setTotalQps(totalQps); @@ -44,7 +44,7 @@ public class ActorPressTest extends RayBenchmarkTest { @Override public ObjectRef> rayCall(ActorHandle rayActor) { - return ((ActorHandle) rayActor).call(Adder::add, 10); + return ((ActorHandle) rayActor).task(Adder::add, 10).remote(); } @Override diff --git a/java/test/src/main/java/io/ray/benchmark/MaxPressureTest.java b/java/test/src/main/java/io/ray/benchmark/MaxPressureTest.java index 44ac89af4..35f4ada42 100644 --- a/java/test/src/main/java/io/ray/benchmark/MaxPressureTest.java +++ b/java/test/src/main/java/io/ray/benchmark/MaxPressureTest.java @@ -30,7 +30,7 @@ public class MaxPressureTest extends RayBenchmarkTest { @Override public ObjectRef> rayCall(ActorHandle rayActor) { - return Ray.call(MaxPressureTest::currentTime); + return Ray.task(MaxPressureTest::currentTime).remote(); } @Override diff --git a/java/test/src/main/java/io/ray/benchmark/MicroBenchmarks.java b/java/test/src/main/java/io/ray/benchmark/MicroBenchmarks.java index 147afa63d..62c0ea534 100644 --- a/java/test/src/main/java/io/ray/benchmark/MicroBenchmarks.java +++ b/java/test/src/main/java/io/ray/benchmark/MicroBenchmarks.java @@ -36,7 +36,7 @@ public class MicroBenchmarks { Ray.init(); try { time(() -> { - Ray.call(MicroBenchmarks::simpleFunction); + Ray.task(MicroBenchmarks::simpleFunction).remote(); }, numRepeats, "task submission"); } finally { Ray.shutdown(); diff --git a/java/test/src/main/java/io/ray/benchmark/RateLimiterPressureTest.java b/java/test/src/main/java/io/ray/benchmark/RateLimiterPressureTest.java index 048048ad0..df9b405cb 100644 --- a/java/test/src/main/java/io/ray/benchmark/RateLimiterPressureTest.java +++ b/java/test/src/main/java/io/ray/benchmark/RateLimiterPressureTest.java @@ -32,7 +32,7 @@ public class RateLimiterPressureTest extends RayBenchmarkTest { @Override public ObjectRef> rayCall(ActorHandle rayActor) { - return Ray.call(RateLimiterPressureTest::currentTime); + return Ray.task(RateLimiterPressureTest::currentTime).remote(); } @Override diff --git a/java/test/src/main/java/io/ray/benchmark/RayBenchmarkTest.java b/java/test/src/main/java/io/ray/benchmark/RayBenchmarkTest.java index 7f5c0d3d5..3c93f77b1 100644 --- a/java/test/src/main/java/io/ray/benchmark/RayBenchmarkTest.java +++ b/java/test/src/main/java/io/ray/benchmark/RayBenchmarkTest.java @@ -135,7 +135,7 @@ public abstract class RayBenchmarkTest extends BaseTest implements Serializab // defect of the Java compiler. // TODO(hchen): Figure out how to avoid manually declaring `RayFunc` type in this case. RayFunc1> func = RayBenchmarkTest::singleClient; - objectRefs[i] = Ray.call(func, pressureTestParameter); + objectRefs[i] = Ray.task(func, pressureTestParameter).remote(); } for (int i = 0; i < clientNum; i++) { List subCounterList = objectRefs[i].get(); diff --git a/java/test/src/main/java/io/ray/benchmark/SingleLatencyTest.java b/java/test/src/main/java/io/ray/benchmark/SingleLatencyTest.java index d71e4bf8b..3c6a7b93f 100644 --- a/java/test/src/main/java/io/ray/benchmark/SingleLatencyTest.java +++ b/java/test/src/main/java/io/ray/benchmark/SingleLatencyTest.java @@ -23,7 +23,7 @@ public class SingleLatencyTest extends RayBenchmarkTest { @Override public ObjectRef> rayCall(ActorHandle rayActor) { - return Ray.call(SingleLatencyTest::doFunc); + return Ray.task(SingleLatencyTest::doFunc).remote(); } @Override diff --git a/java/test/src/main/java/io/ray/test/ActorConcurrentCallTest.java b/java/test/src/main/java/io/ray/test/ActorConcurrentCallTest.java index f0ffcea5f..c1f963bf2 100644 --- a/java/test/src/main/java/io/ray/test/ActorConcurrentCallTest.java +++ b/java/test/src/main/java/io/ray/test/ActorConcurrentCallTest.java @@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableList; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; -import io.ray.api.options.ActorCreationOptions; import java.util.List; import java.util.concurrent.CountDownLatch; import org.testng.Assert; @@ -30,13 +29,13 @@ public class ActorConcurrentCallTest extends BaseTest { public void testConcurrentCall() { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions op = new ActorCreationOptions.Builder() - .setMaxConcurrency(3) - .createActorCreationOptions(); - ActorHandle actor = Ray.createActor(ConcurrentActor::new, op); - ObjectRef obj1 = actor.call(ConcurrentActor::countDown); - ObjectRef obj2 = actor.call(ConcurrentActor::countDown); - ObjectRef obj3 = actor.call(ConcurrentActor::countDown); + ActorHandle actor = + Ray.actor(ConcurrentActor::new) + .setMaxConcurrency(3) + .remote(); + ObjectRef obj1 = actor.task(ConcurrentActor::countDown).remote(); + ObjectRef obj2 = actor.task(ConcurrentActor::countDown).remote(); + ObjectRef obj3 = actor.task(ConcurrentActor::countDown).remote(); List expectedResult = ImmutableList.of(1, 2, 3); Assert.assertEquals(obj1.get(), "ok"); diff --git a/java/test/src/main/java/io/ray/test/ActorRestartTest.java b/java/test/src/main/java/io/ray/test/ActorRestartTest.java index 05c22a334..1c7fdb946 100644 --- a/java/test/src/main/java/io/ray/test/ActorRestartTest.java +++ b/java/test/src/main/java/io/ray/test/ActorRestartTest.java @@ -6,7 +6,6 @@ import io.ray.api.Ray; import io.ray.api.exception.RayActorException; import io.ray.api.id.ActorId; import io.ray.api.id.UniqueId; -import io.ray.api.options.ActorCreationOptions; import io.ray.runtime.util.SystemUtil; import java.io.IOException; import java.util.List; @@ -43,35 +42,33 @@ public class ActorRestartTest extends BaseTest { public void testActorRestart() throws InterruptedException, IOException { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions options = - new ActorCreationOptions.Builder().setMaxRestarts(1).createActorCreationOptions(); - ActorHandle actor = Ray.createActor(Counter::new, options); + ActorHandle actor = Ray.actor(Counter::new).setMaxRestarts(1).remote(); // Call increase 3 times. for (int i = 0; i < 3; i++) { - actor.call(Counter::increase).get(); + actor.task(Counter::increase).remote().get(); } - Assert.assertFalse(actor.call(Counter::wasCurrentActorRestarted).get()); + Assert.assertFalse(actor.task(Counter::wasCurrentActorRestarted).remote().get()); // Kill the actor process. - int pid = actor.call(Counter::getPid).get(); + int pid = actor.task(Counter::getPid).remote().get(); Runtime.getRuntime().exec("kill -9 " + pid); // Wait for the actor to be killed. TimeUnit.SECONDS.sleep(1); - int value = actor.call(Counter::increase).get(); + int value = actor.task(Counter::increase).remote().get(); Assert.assertEquals(value, 1); - Assert.assertTrue(actor.call(Counter::wasCurrentActorRestarted).get()); + Assert.assertTrue(actor.task(Counter::wasCurrentActorRestarted).remote().get()); // Kill the actor process again. - pid = actor.call(Counter::getPid).get(); + pid = actor.task(Counter::getPid).remote().get(); Runtime.getRuntime().exec("kill -9 " + pid); TimeUnit.SECONDS.sleep(1); // Try calling increase on this actor again and this should fail. try { - actor.call(Counter::increase).get(); + actor.task(Counter::increase).remote().get(); Assert.fail("The above task didn't fail."); } catch (RayActorException e) { // We should receive a RayActorException because the actor is dead. @@ -122,25 +119,24 @@ public class ActorRestartTest extends BaseTest { public void testActorCheckpointing() throws IOException, InterruptedException { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions options = - new ActorCreationOptions.Builder().setMaxRestarts(1).createActorCreationOptions(); - ActorHandle actor = Ray.createActor(CheckpointableCounter::new, options); + ActorHandle actor = Ray.actor(CheckpointableCounter::new) + .setMaxRestarts(1).remote(); // Call increase 3 times. for (int i = 0; i < 3; i++) { - actor.call(CheckpointableCounter::increase).get(); + actor.task(CheckpointableCounter::increase).remote().get(); } // Assert that the actor wasn't resumed from a checkpoint. - Assert.assertFalse(actor.call(CheckpointableCounter::wasResumedFromCheckpoint).get()); - int pid = actor.call(CheckpointableCounter::getPid).get(); + Assert.assertFalse(actor.task(CheckpointableCounter::wasResumedFromCheckpoint).remote().get()); + int pid = actor.task(CheckpointableCounter::getPid).remote().get(); Runtime.getRuntime().exec("kill -9 " + pid); // Wait for the actor to be killed. TimeUnit.SECONDS.sleep(1); // Try calling increase on this actor again and check the value is now 4. - int value = actor.call(CheckpointableCounter::increase).get(); + int value = actor.task(CheckpointableCounter::increase).remote().get(); Assert.assertEquals(value, 4); // Assert that the actor was resumed from a checkpoint. - Assert.assertTrue(actor.call(CheckpointableCounter::wasResumedFromCheckpoint).get()); + Assert.assertTrue(actor.task(CheckpointableCounter::wasResumedFromCheckpoint).remote().get()); } } diff --git a/java/test/src/main/java/io/ray/test/ActorTest.java b/java/test/src/main/java/io/ray/test/ActorTest.java index 5b9623bb2..ef1af1ee1 100644 --- a/java/test/src/main/java/io/ray/test/ActorTest.java +++ b/java/test/src/main/java/io/ray/test/ActorTest.java @@ -46,14 +46,15 @@ public class ActorTest extends BaseTest { public void testCreateAndCallActor() { // Test creating an actor from a constructor - ActorHandle actor = Ray.createActor(Counter::new, 1); + ActorHandle actor = Ray.actor(Counter::new, 1).remote(); Assert.assertNotEquals(actor.getId(), ActorId.NIL); // A java actor is not a python actor Assert.assertFalse(actor instanceof PyActorHandle); // Test calling an actor - Assert.assertEquals(Integer.valueOf(1), actor.call(Counter::getValue).get()); - actor.call(Counter::increase, 1); - Assert.assertEquals(Integer.valueOf(3), actor.call(Counter::increaseAndGet, 1).get()); + Assert.assertEquals(Integer.valueOf(1), actor.task(Counter::getValue).remote().get()); + actor.task(Counter::increase, 1).remote(); + Assert.assertEquals(Integer.valueOf(3), + actor.task(Counter::increaseAndGet, 1).remote().get()); } /** @@ -63,8 +64,8 @@ public class ActorTest extends BaseTest { * get. To enable getting it twice, we cache the object in `RayObjectImpl`. */ public void testGetObjectTwice() { - ActorHandle actor = Ray.createActor(Counter::new, 1); - ObjectRef result = actor.call(Counter::getValue); + ActorHandle actor = Ray.actor(Counter::new, 1).remote(); + ObjectRef result = actor.task(Counter::getValue).remote(); Assert.assertEquals(result.get(), Integer.valueOf(1)); Assert.assertEquals(result.get(), Integer.valueOf(1)); // TODO(hchen): The following code will still fail, and can be fixed by using ref counting. @@ -72,10 +73,10 @@ public class ActorTest extends BaseTest { } public void testCallActorWithLargeObject() { - ActorHandle actor = Ray.createActor(Counter::new, 1); + ActorHandle actor = Ray.actor(Counter::new, 1).remote(); TestUtils.LargeObject largeObject = new TestUtils.LargeObject(); Assert.assertEquals(Integer.valueOf(largeObject.data.length + 1), - actor.call(Counter::accessLargeObject, largeObject).get()); + actor.task(Counter::accessLargeObject, largeObject).remote().get()); } static Counter factory(int initValue) { @@ -84,36 +85,36 @@ public class ActorTest extends BaseTest { public void testCreateActorFromFactory() { // Test creating an actor from a factory method - ActorHandle actor = Ray.createActor(ActorTest::factory, 1); + ActorHandle actor = Ray.actor(ActorTest::factory, 1).remote(); Assert.assertNotEquals(actor.getId(), UniqueId.NIL); // Test calling an actor - Assert.assertEquals(Integer.valueOf(1), actor.call(Counter::getValue).get()); + Assert.assertEquals(Integer.valueOf(1), actor.task(Counter::getValue).remote().get()); } static int testActorAsFirstParameter(ActorHandle actor, int delta) { - ObjectRef res = actor.call(Counter::increaseAndGet, delta); + ObjectRef res = actor.task(Counter::increaseAndGet, delta).remote(); return res.get(); } static int testActorAsSecondParameter(int delta, ActorHandle actor) { - ObjectRef res = actor.call(Counter::increaseAndGet, delta); + ObjectRef res = actor.task(Counter::increaseAndGet, delta).remote(); return res.get(); } static int testActorAsFieldOfParameter(List> actor, int delta) { - ObjectRef res = actor.get(0).call(Counter::increaseAndGet, delta); + ObjectRef res = actor.get(0).task(Counter::increaseAndGet, delta).remote(); return res.get(); } public void testPassActorAsParameter() { - ActorHandle actor = Ray.createActor(Counter::new, 0); + ActorHandle actor = Ray.actor(Counter::new, 0).remote(); Assert.assertEquals(Integer.valueOf(1), - Ray.call(ActorTest::testActorAsFirstParameter, actor, 1).get()); + Ray.task(ActorTest::testActorAsFirstParameter, actor, 1).remote().get()); Assert.assertEquals(Integer.valueOf(11), - Ray.call(ActorTest::testActorAsSecondParameter, 10, actor).get()); + Ray.task(ActorTest::testActorAsSecondParameter, 10, actor).remote().get()); Assert.assertEquals(Integer.valueOf(111), - Ray.call(ActorTest::testActorAsFieldOfParameter, Collections.singletonList(actor), 100) - .get()); + Ray.task(ActorTest::testActorAsFieldOfParameter, + Collections.singletonList(actor), 100).remote().get()); } // TODO(qwang): Will re-enable this test case once ref counting is supported in Java. @@ -122,9 +123,9 @@ public class ActorTest extends BaseTest { TestUtils.skipTestUnderSingleProcess(); // The UnreconstructableException is created by raylet. - ActorHandle counter = Ray.createActor(Counter::new, 100); + ActorHandle counter = Ray.actor(Counter::new, 100).remote(); // Call an actor method. - ObjectRef value = counter.call(Counter::getValue); + ObjectRef value = counter.task(Counter::getValue).remote(); Assert.assertEquals(100, value.get()); // Delete the object from the object store. Ray.internal().free(ImmutableList.of(value.getId()), false, false); diff --git a/java/test/src/main/java/io/ray/test/CrossLanguageInvocationTest.java b/java/test/src/main/java/io/ray/test/CrossLanguageInvocationTest.java index 9015576c5..f910c486d 100644 --- a/java/test/src/main/java/io/ray/test/CrossLanguageInvocationTest.java +++ b/java/test/src/main/java/io/ray/test/CrossLanguageInvocationTest.java @@ -69,24 +69,24 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { 1.234, // Double "example binary".getBytes()}; // byte[] for (Object o : inputs) { - ObjectRef res = Ray.call( + ObjectRef res = Ray.task( new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", o.getClass()), - o); + o).remote(); Assert.assertEquals(res.get(), o); } // null { Object input = null; - ObjectRef res = Ray.call( - new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", Object.class), input); + ObjectRef res = Ray.task( + new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", Object.class), input).remote(); Object r = res.get(); Assert.assertEquals(r, input); } // array { int[] input = new int[]{1, 2}; - ObjectRef res = Ray.call( - new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", int[].class), input); + ObjectRef res = Ray.task( + new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", int[].class), input).remote(); int[] r = res.get(); Assert.assertEquals(r, input); } @@ -94,8 +94,8 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { { Object[] input = new Object[]{1, 2.3f, 4.56, "789", "10".getBytes(), null, true, new int[]{1, 2}}; - ObjectRef res = Ray.call( - new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", Object[].class), input); + ObjectRef res = Ray.task( + new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", Object[].class), input).remote(); Object[] r = res.get(); // If we tell the value type is Object, then all numbers will be Number type. Assert.assertEquals(((Number) r[0]).intValue(), input[0]); @@ -119,9 +119,9 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { { Assert.expectThrows(Exception.class, () -> { List input = Arrays.asList(1, 2); - ObjectRef> res = Ray.call( + ObjectRef> res = Ray.task( new PyRemoteFunction<>(PYTHON_MODULE, "py_return_input", - (Class>) input.getClass()), input); + (Class>) input.getClass()), input).remote(); List r = res.get(); Assert.assertEquals(r, input); }); @@ -130,26 +130,26 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { @Test public void testPythonCallJavaFunction() { - ObjectRef res = Ray.call( - new PyRemoteFunction<>(PYTHON_MODULE, "py_func_call_java_function", String.class)); + ObjectRef res = Ray.task(new PyRemoteFunction<>( + PYTHON_MODULE, "py_func_call_java_function", String.class)).remote(); Assert.assertEquals(res.get(), "success"); } @Test public void testCallingPythonActor() { - PyActorHandle actor = Ray.createActor( - new PyActorClass(PYTHON_MODULE, "Counter"), "1".getBytes()); - ObjectRef res = actor.call( + PyActorHandle actor = Ray.actor( + new PyActorClass(PYTHON_MODULE, "Counter"), "1".getBytes()).remote(); + ObjectRef res = actor.task( new PyActorMethod<>("increase", byte[].class), - "1".getBytes()); + "1".getBytes()).remote(); Assert.assertEquals(res.get(), "2".getBytes()); } @Test public void testPythonCallJavaActor() { - ObjectRef res = Ray.call( + ObjectRef res = Ray.task( new PyRemoteFunction<>(PYTHON_MODULE, "py_func_call_java_actor", byte[].class), - "1".getBytes()); + "1".getBytes()).remote(); Assert.assertEquals(res.get(), "Counter1".getBytes()); } @@ -158,33 +158,33 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { public void testPassActorHandleFromPythonToJava() { // Call a python function which creates a python actor // and pass the actor handle to callPythonActorHandle. - ObjectRef res = Ray.call( - new PyRemoteFunction<>(PYTHON_MODULE, "py_func_pass_python_actor_handle", byte[].class)); + ObjectRef res = Ray.task(new PyRemoteFunction<>( + PYTHON_MODULE, "py_func_pass_python_actor_handle", byte[].class)).remote(); Assert.assertEquals(res.get(), "3".getBytes()); } @Test public void testPassActorHandleFromJavaToPython() { // Create a java actor, and pass actor handle to python. - ActorHandle javaActor = Ray.createActor(TestActor::new, "1".getBytes()); + ActorHandle javaActor = Ray.actor(TestActor::new, "1".getBytes()).remote(); Preconditions.checkState(javaActor instanceof NativeActorHandle); byte[] actorHandleBytes = ((NativeActorHandle) javaActor).toBytes(); - ObjectRef res = Ray.call( + ObjectRef res = Ray.task( new PyRemoteFunction<>(PYTHON_MODULE, "py_func_call_java_actor_from_handle", byte[].class), - actorHandleBytes); + actorHandleBytes).remote(); Assert.assertEquals(res.get(), "12".getBytes()); // Create a python actor, and pass actor handle to python. - PyActorHandle pyActor = Ray.createActor( - new PyActorClass(PYTHON_MODULE, "Counter"), "1".getBytes()); + PyActorHandle pyActor = Ray.actor( + new PyActorClass(PYTHON_MODULE, "Counter"), "1".getBytes()).remote(); Preconditions.checkState(pyActor instanceof NativeActorHandle); actorHandleBytes = ((NativeActorHandle) pyActor).toBytes(); - res = Ray.call( + res = Ray.task( new PyRemoteFunction<>(PYTHON_MODULE, "py_func_call_python_actor_from_handle", byte[].class), - actorHandleBytes); + actorHandleBytes).remote(); Assert.assertEquals(res.get(), "3".getBytes()); } @@ -220,9 +220,9 @@ public class CrossLanguageInvocationTest extends BaseMultiLanguageTest { public static byte[] callPythonActorHandle(byte[] value) { // This function will be called from test_cross_language_invocation.py NativePyActorHandle actor = (NativePyActorHandle) NativeActorHandle.fromBytes(value); - ObjectRef res = actor.call( + ObjectRef res = actor.task( new PyActorMethod<>("increase", byte[].class), - "1".getBytes()); + "1".getBytes()).remote(); Assert.assertEquals(res.get(), "3".getBytes()); return (byte[]) res.get(); } diff --git a/java/test/src/main/java/io/ray/test/DynamicResourceTest.java b/java/test/src/main/java/io/ray/test/DynamicResourceTest.java index b1bd48878..aa46f8e62 100644 --- a/java/test/src/main/java/io/ray/test/DynamicResourceTest.java +++ b/java/test/src/main/java/io/ray/test/DynamicResourceTest.java @@ -1,11 +1,9 @@ package io.ray.test; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.WaitResult; -import io.ray.api.options.CallOptions; import io.ray.api.runtimecontext.NodeInfo; import java.util.List; import org.testng.Assert; @@ -24,9 +22,9 @@ public class DynamicResourceTest extends BaseTest { // Call a task in advance to warm up the cluster to avoid being too slow to start workers. TestUtils.warmUpCluster(); - CallOptions op1 = - new CallOptions.Builder().setResources(ImmutableMap.of("A", 10.0)).createCallOptions(); - ObjectRef obj = Ray.call(DynamicResourceTest::sayHi, op1); + ObjectRef obj = Ray.task(DynamicResourceTest::sayHi) + .setResource("A", 10.0) + .remote(); WaitResult result = Ray.wait(ImmutableList.of(obj), 1, 1000); Assert.assertEquals(result.getReady().size(), 0); diff --git a/java/test/src/main/java/io/ray/test/FailureTest.java b/java/test/src/main/java/io/ray/test/FailureTest.java index 4a8686e3f..7e1dec0ed 100644 --- a/java/test/src/main/java/io/ray/test/FailureTest.java +++ b/java/test/src/main/java/io/ray/test/FailureTest.java @@ -87,28 +87,28 @@ public class FailureTest extends BaseTest { @Test public void testNormalTaskFailure() { TestUtils.skipTestUnderSingleProcess(); - assertTaskFailedWithRayTaskException(Ray.call(FailureTest::badFunc)); + assertTaskFailedWithRayTaskException(Ray.task(FailureTest::badFunc).remote()); } @Test public void testActorCreationFailure() { TestUtils.skipTestUnderSingleProcess(); - ActorHandle actor = Ray.createActor(BadActor::new, true); - assertTaskFailedWithRayTaskException(actor.call(BadActor::badMethod)); + ActorHandle actor = Ray.actor(BadActor::new, true).remote(); + assertTaskFailedWithRayTaskException(actor.task(BadActor::badMethod).remote()); } @Test public void testActorTaskFailure() { TestUtils.skipTestUnderSingleProcess(); - ActorHandle actor = Ray.createActor(BadActor::new, false); - assertTaskFailedWithRayTaskException(actor.call(BadActor::badMethod)); + ActorHandle actor = Ray.actor(BadActor::new, false).remote(); + assertTaskFailedWithRayTaskException(actor.task(BadActor::badMethod).remote()); } @Test public void testWorkerProcessDying() { TestUtils.skipTestUnderSingleProcess(); try { - Ray.call(FailureTest::badFunc2).get(); + Ray.task(FailureTest::badFunc2).remote().get(); Assert.fail("This line shouldn't be reached."); } catch (RayWorkerException e) { // When the worker process dies while executing a task, we should receive an @@ -119,16 +119,16 @@ public class FailureTest extends BaseTest { @Test public void testActorProcessDying() { TestUtils.skipTestUnderSingleProcess(); - ActorHandle actor = Ray.createActor(BadActor::new, false); + ActorHandle actor = Ray.actor(BadActor::new, false).remote(); try { - actor.call(BadActor::badMethod2).get(); + actor.task(BadActor::badMethod2).remote().get(); Assert.fail("This line shouldn't be reached."); } catch (RayActorException e) { // When the actor process dies while executing a task, we should receive an // RayActorException. } try { - actor.call(BadActor::badMethod).get(); + actor.task(BadActor::badMethod).remote().get(); Assert.fail("This line shouldn't be reached."); } catch (RayActorException e) { // When a actor task is submitted to a dead actor, we should also receive an @@ -143,8 +143,8 @@ public class FailureTest extends BaseTest { FailureTest::badFunc2); TestUtils.warmUpCluster(); for (RayFunc0 badFunc : badFunctions) { - ObjectRef obj1 = Ray.call(badFunc); - ObjectRef obj2 = Ray.call(FailureTest::slowFunc); + ObjectRef obj1 = Ray.task(badFunc).remote(); + ObjectRef obj2 = Ray.task(FailureTest::slowFunc).remote(); Instant start = Instant.now(); try { Ray.get(Arrays.asList(obj1, obj2)); diff --git a/java/test/src/main/java/io/ray/test/HelloWorldTest.java b/java/test/src/main/java/io/ray/test/HelloWorldTest.java index 910162f5c..b9d2ba1d3 100644 --- a/java/test/src/main/java/io/ray/test/HelloWorldTest.java +++ b/java/test/src/main/java/io/ray/test/HelloWorldTest.java @@ -24,9 +24,9 @@ public class HelloWorldTest extends BaseTest { @Test public void testHelloWorld() { - ObjectRef hello = Ray.call(HelloWorldTest::hello); - ObjectRef world = Ray.call(HelloWorldTest::world); - String helloWorld = Ray.call(HelloWorldTest::merge, hello, world).get(); + ObjectRef hello = Ray.task(HelloWorldTest::hello).remote(); + ObjectRef world = Ray.task(HelloWorldTest::world).remote(); + String helloWorld = Ray.task(HelloWorldTest::merge, hello, world).remote().get(); Assert.assertEquals("hello,world!", helloWorld); } diff --git a/java/test/src/main/java/io/ray/test/KillActorTest.java b/java/test/src/main/java/io/ray/test/KillActorTest.java index 68df29924..76995322c 100644 --- a/java/test/src/main/java/io/ray/test/KillActorTest.java +++ b/java/test/src/main/java/io/ray/test/KillActorTest.java @@ -5,7 +5,6 @@ import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.exception.RayActorException; -import io.ray.api.options.ActorCreationOptions; import java.util.function.BiConsumer; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -50,19 +49,20 @@ public class KillActorTest extends BaseTest { } private static void remoteKill(ActorHandle actor, boolean noRestart) { - ActorHandle killer = Ray.createActor(KillerActor::new); - killer.call(KillerActor::kill, actor, noRestart); + ActorHandle killer = Ray.actor(KillerActor::new).remote(); + killer.task(KillerActor::kill, actor, noRestart).remote(); } private void testKillActor(BiConsumer, Boolean> kill, boolean noRestart) { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions options = - new ActorCreationOptions.Builder().setMaxRestarts(1).createActorCreationOptions(); - ActorHandle actor = Ray.createActor(HangActor::new, options); - ObjectRef result = actor.call(HangActor::hang); + ActorHandle actor = Ray.actor(HangActor::new) + .setMaxRestarts(1) + .remote(); + ObjectRef result = actor.task(HangActor::hang).remote(); // The actor will hang in this task. - Assert.assertEquals(0, Ray.wait(ImmutableList.of(result), 1, 500).getReady().size()); + Assert.assertEquals(0, + Ray.wait(ImmutableList.of(result), 1, 500).getReady().size()); // Kill the actor kill.accept(actor, noRestart); @@ -79,9 +79,10 @@ public class KillActorTest extends BaseTest { if (noRestart) { // The actor should not be restarted. - Assert.expectThrows(RayActorException.class, () -> actor.call(HangActor::hang).get()); + Assert.expectThrows(RayActorException.class, + () -> actor.task(HangActor::hang).remote().get()); } else { - Assert.assertEquals(actor.call(HangActor::ping).get(), "pong"); + Assert.assertEquals(actor.task(HangActor::ping).remote().get(), "pong"); } } diff --git a/java/test/src/main/java/io/ray/test/MultiLanguageClusterTest.java b/java/test/src/main/java/io/ray/test/MultiLanguageClusterTest.java index 241e7cc2b..7ff3b53fe 100644 --- a/java/test/src/main/java/io/ray/test/MultiLanguageClusterTest.java +++ b/java/test/src/main/java/io/ray/test/MultiLanguageClusterTest.java @@ -13,7 +13,7 @@ public class MultiLanguageClusterTest extends BaseMultiLanguageTest { @Test public void testMultiLanguageCluster() { - ObjectRef obj = Ray.call(MultiLanguageClusterTest::echo, "hello"); + ObjectRef obj = Ray.task(MultiLanguageClusterTest::echo, "hello").remote(); Assert.assertEquals("hello", obj.get()); } diff --git a/java/test/src/main/java/io/ray/test/MultiThreadingTest.java b/java/test/src/main/java/io/ray/test/MultiThreadingTest.java index 1d609c307..5a63cdda4 100644 --- a/java/test/src/main/java/io/ray/test/MultiThreadingTest.java +++ b/java/test/src/main/java/io/ray/test/MultiThreadingTest.java @@ -72,22 +72,22 @@ public class MultiThreadingTest extends BaseTest { // Test calling normal functions. runTestCaseInMultipleThreads(() -> { int arg = random.nextInt(); - ObjectRef obj = Ray.call(MultiThreadingTest::echo, arg); + ObjectRef obj = Ray.task(MultiThreadingTest::echo, arg).remote(); Assert.assertEquals(arg, (int) obj.get()); }, LOOP_COUNTER); // Test calling actors. - ActorHandle echoActor = Ray.createActor(Echo::new); + ActorHandle echoActor = Ray.actor(Echo::new).remote(); runTestCaseInMultipleThreads(() -> { int arg = random.nextInt(); - ObjectRef obj = echoActor.call(Echo::echo, arg); + ObjectRef obj = echoActor.task(Echo::echo, arg).remote(); Assert.assertEquals(arg, (int) obj.get()); }, LOOP_COUNTER); // Test creating multi actors runTestCaseInMultipleThreads(() -> { int arg = random.nextInt(); - ActorHandle echoActor1 = Ray.createActor(Echo::new); + ActorHandle echoActor1 = Ray.actor(Echo::new).remote(); try { // Sleep a while to test the case that another actor is created before submitting // tasks to this actor. @@ -95,7 +95,7 @@ public class MultiThreadingTest extends BaseTest { } catch (InterruptedException e) { LOGGER.warn("Got exception while sleeping.", e); } - ObjectRef obj = echoActor1.call(Echo::echo, arg); + ObjectRef obj = echoActor1.task(Echo::echo, arg).remote(); Assert.assertEquals(arg, (int) obj.get()); }, 1); @@ -108,7 +108,7 @@ public class MultiThreadingTest extends BaseTest { TestUtils.warmUpCluster(); // Test wait for one object in multi threads. - ObjectRef obj = Ray.call(MultiThreadingTest::echo, 100); + ObjectRef obj = Ray.task(MultiThreadingTest::echo, 100).remote(); runTestCaseInMultipleThreads(() -> { WaitResult result = Ray.wait(ImmutableList.of(obj), 1, 1000); Assert.assertEquals(1, result.getReady().size()); @@ -124,14 +124,14 @@ public class MultiThreadingTest extends BaseTest { public void testInWorker() { // Single-process mode doesn't have real workers. TestUtils.skipTestUnderSingleProcess(); - ObjectRef obj = Ray.call(MultiThreadingTest::testMultiThreading); + ObjectRef obj = Ray.task(MultiThreadingTest::testMultiThreading).remote(); Assert.assertEquals("ok", obj.get()); } public void testGetCurrentActorId() { TestUtils.skipTestUnderSingleProcess(); - ActorHandle actorIdTester = Ray.createActor(ActorIdTester::new); - ActorId actorId = actorIdTester.call(ActorIdTester::getCurrentActorId).get(); + ActorHandle actorIdTester = Ray.actor(ActorIdTester::new).remote(); + ActorId actorId = actorIdTester.task(ActorIdTester::getCurrentActorId).remote().get(); Assert.assertEquals(actorId, actorIdTester.getId()); } @@ -140,16 +140,16 @@ public class MultiThreadingTest extends BaseTest { */ static Runnable[] generateRunnables() { final ObjectRef fooObject = Ray.put(1); - final ActorHandle fooActor = Ray.createActor(Echo::new); + final ActorHandle fooActor = Ray.actor(Echo::new).remote(); return new Runnable[]{ () -> Ray.put(1), () -> Ray.get(fooObject.getId(), fooObject.getType()), fooObject::get, () -> Ray.wait(ImmutableList.of(fooObject)), Ray::getRuntimeContext, - () -> Ray.call(MultiThreadingTest::echo, 1), - () -> Ray.createActor(Echo::new), - () -> fooActor.call(Echo::echo, 1), + () -> Ray.task(MultiThreadingTest::echo, 1).remote(), + () -> Ray.actor(Echo::new).remote(), + () -> fooActor.task(Echo::echo, 1), }; } @@ -218,7 +218,7 @@ public class MultiThreadingTest extends BaseTest { runnables[0].run(); } - // Return true here to make the Ray.call returns an ObjectRef. + // Return true here to make the caller.remote() returns an ObjectRef. return true; } @@ -229,7 +229,7 @@ public class MultiThreadingTest extends BaseTest { @Test public void testMissingWrapRunnableInWorker() { - Ray.call(MultiThreadingTest::testMissingWrapRunnable).get(); + Ray.task(MultiThreadingTest::testMissingWrapRunnable).remote().get(); } @Test @@ -302,7 +302,8 @@ public class MultiThreadingTest extends BaseTest { } public void testGetAsyncContextAndSetAsyncContextInWorker() { - ObjectRef obj = Ray.call(MultiThreadingTest::testGetAsyncContextAndSetAsyncContext); + ObjectRef obj = Ray.task( + MultiThreadingTest::testGetAsyncContextAndSetAsyncContext).remote(); Assert.assertTrue(obj.get()); } diff --git a/java/test/src/main/java/io/ray/test/PlasmaFreeTest.java b/java/test/src/main/java/io/ray/test/PlasmaFreeTest.java index 072d86732..b3441505f 100644 --- a/java/test/src/main/java/io/ray/test/PlasmaFreeTest.java +++ b/java/test/src/main/java/io/ray/test/PlasmaFreeTest.java @@ -16,7 +16,7 @@ public class PlasmaFreeTest extends BaseTest { @Test public void testDeleteObjects() { - ObjectRef helloId = Ray.call(PlasmaFreeTest::hello); + ObjectRef helloId = Ray.task(PlasmaFreeTest::hello).remote(); String helloString = helloId.get(); Assert.assertEquals("hello", helloString); Ray.internal().free(ImmutableList.of(helloId.getId()), true, false); @@ -35,7 +35,7 @@ public class PlasmaFreeTest extends BaseTest { @Test public void testDeleteCreatingTasks() { TestUtils.skipTestUnderSingleProcess(); - ObjectRef helloId = Ray.call(PlasmaFreeTest::hello); + ObjectRef helloId = Ray.task(PlasmaFreeTest::hello).remote(); Assert.assertEquals("hello", helloId.get()); Ray.internal().free(ImmutableList.of(helloId.getId()), true, true); diff --git a/java/test/src/main/java/io/ray/test/RayCallTest.java b/java/test/src/main/java/io/ray/test/RayCallTest.java index 292a80b76..d56f99adf 100644 --- a/java/test/src/main/java/io/ray/test/RayCallTest.java +++ b/java/test/src/main/java/io/ray/test/RayCallTest.java @@ -68,26 +68,26 @@ public class RayCallTest extends BaseTest { */ @Test public void testType() { - Assert.assertEquals(1, (int) Ray.call(RayCallTest::testInt, 1).get()); - Assert.assertEquals(1, (byte) Ray.call(RayCallTest::testByte, (byte) 1).get()); - Assert.assertEquals(1, (short) Ray.call(RayCallTest::testShort, (short) 1).get()); - Assert.assertEquals(1, (long) Ray.call(RayCallTest::testLong, 1L).get()); - Assert.assertEquals(1.0, Ray.call(RayCallTest::testDouble, 1.0).get(), 0.0); - Assert.assertEquals(1.0f, Ray.call(RayCallTest::testFloat, 1.0f).get(), 0.0); - Assert.assertTrue(Ray.call(RayCallTest::testBool, true).get()); - Assert.assertEquals("foo", Ray.call(RayCallTest::testString, "foo").get()); + Assert.assertEquals(1, (int) Ray.task(RayCallTest::testInt, 1).remote().get()); + Assert.assertEquals(1, (byte) Ray.task(RayCallTest::testByte, (byte) 1).remote().get()); + Assert.assertEquals(1, (short) Ray.task(RayCallTest::testShort, (short) 1).remote().get()); + Assert.assertEquals(1, (long) Ray.task(RayCallTest::testLong, 1L).remote().get()); + Assert.assertEquals(1.0, Ray.task(RayCallTest::testDouble, 1.0).remote().get(), 0.0); + Assert.assertEquals(1.0f, Ray.task(RayCallTest::testFloat, 1.0f).remote().get(), 0.0); + Assert.assertTrue(Ray.task(RayCallTest::testBool, true).remote().get()); + Assert.assertEquals("foo", Ray.task(RayCallTest::testString, "foo").remote().get()); List list = ImmutableList.of(1, 2, 3); - Assert.assertEquals(list, Ray.call(RayCallTest::testList, list).get()); + Assert.assertEquals(list, Ray.task(RayCallTest::testList, list).remote().get()); Map map = ImmutableMap.of("1", 1, "2", 2); - Assert.assertEquals(map, Ray.call(RayCallTest::testMap, map).get()); + Assert.assertEquals(map, Ray.task(RayCallTest::testMap, map).remote().get()); TestUtils.LargeObject largeObject = new TestUtils.LargeObject(); - Assert.assertNotNull(Ray.call(RayCallTest::testLargeObject, largeObject).get()); + Assert.assertNotNull(Ray.task(RayCallTest::testLargeObject, largeObject).remote().get()); // TODO(edoakes): this test doesn't work now that we've switched to direct call // mode. To make it work, we need to implement the same protocol for resolving // passed ObjectIDs that we have in Python. // ObjectId randomObjectId = ObjectId.fromRandom(); - // Ray.call(RayCallTest::testNoReturn, randomObjectId); + // Ray.task(RayCallTest::testNoReturn, randomObjectId).remote(); // Assert.assertEquals(((int) Ray.get(randomObjectId, Integer.class)), 1); } @@ -121,13 +121,18 @@ public class RayCallTest extends BaseTest { @Test public void testNumberOfParameters() { - Assert.assertEquals(0, (int) Ray.call(RayCallTest::testNoParam).get()); - Assert.assertEquals(1, (int) Ray.call(RayCallTest::testOneParam, 1).get()); - Assert.assertEquals(2, (int) Ray.call(RayCallTest::testTwoParams, 1, 1).get()); - Assert.assertEquals(3, (int) Ray.call(RayCallTest::testThreeParams, 1, 1, 1).get()); - Assert.assertEquals(4, (int) Ray.call(RayCallTest::testFourParams, 1, 1, 1, 1).get()); - Assert.assertEquals(5, (int) Ray.call(RayCallTest::testFiveParams, 1, 1, 1, 1, 1).get()); - Assert.assertEquals(6, (int) Ray.call(RayCallTest::testSixParams, 1, 1, 1, 1, 1, 1).get()); + Assert.assertEquals(0, (int) Ray.task(RayCallTest::testNoParam).remote().get()); + Assert.assertEquals(1, (int) Ray.task(RayCallTest::testOneParam, 1).remote().get()); + Assert.assertEquals(2, (int) Ray.task( + RayCallTest::testTwoParams, 1, 1).remote().get()); + Assert.assertEquals(3, (int) Ray.task( + RayCallTest::testThreeParams, 1, 1, 1).remote().get()); + Assert.assertEquals(4, (int) Ray.task( + RayCallTest::testFourParams, 1, 1, 1, 1).remote().get()); + Assert.assertEquals(5, (int) Ray.task( + RayCallTest::testFiveParams, 1, 1, 1, 1, 1).remote().get()); + Assert.assertEquals(6, (int) Ray.task( + RayCallTest::testSixParams, 1, 1, 1, 1, 1, 1).remote().get()); } } diff --git a/java/test/src/main/java/io/ray/test/RaySerializerTest.java b/java/test/src/main/java/io/ray/test/RaySerializerTest.java index 557ce80e5..af8878103 100644 --- a/java/test/src/main/java/io/ray/test/RaySerializerTest.java +++ b/java/test/src/main/java/io/ray/test/RaySerializerTest.java @@ -12,8 +12,8 @@ public class RaySerializerTest extends BaseMultiLanguageTest { @Test public void testSerializePyActor() { - PyActorHandle pyActor = Ray.createActor( - new PyActorClass("test", "RaySerializerTest")); + PyActorHandle pyActor = Ray.actor( + new PyActorClass("test", "RaySerializerTest")).remote(); NativeRayObject nativeRayObject = ObjectSerializer.serialize(pyActor); PyActorHandle result = (PyActorHandle) ObjectSerializer .deserialize(nativeRayObject, null, Object.class); diff --git a/java/test/src/main/java/io/ray/test/RayletConfigTest.java b/java/test/src/main/java/io/ray/test/RayletConfigTest.java index b0ad458b1..5642014e7 100644 --- a/java/test/src/main/java/io/ray/test/RayletConfigTest.java +++ b/java/test/src/main/java/io/ray/test/RayletConfigTest.java @@ -31,8 +31,8 @@ public class RayletConfigTest extends BaseTest { @Test public void testRayletConfigPassThrough() { - ActorHandle actor = Ray.createActor(TestActor::new); - String configValue = actor.call(TestActor::getConfigValue).get(); + ActorHandle actor = Ray.actor(TestActor::new).remote(); + String configValue = actor.task(TestActor::getConfigValue).remote().get(); Assert.assertEquals(configValue, RAY_CONFIG_VALUE); } } diff --git a/java/test/src/main/java/io/ray/test/RedisPasswordTest.java b/java/test/src/main/java/io/ray/test/RedisPasswordTest.java index 54b97c21a..65d9f9bd1 100644 --- a/java/test/src/main/java/io/ray/test/RedisPasswordTest.java +++ b/java/test/src/main/java/io/ray/test/RedisPasswordTest.java @@ -27,7 +27,7 @@ public class RedisPasswordTest extends BaseTest { @Test public void testRedisPassword() { - ObjectRef obj = Ray.call(RedisPasswordTest::echo, "hello"); + ObjectRef obj = Ray.task(RedisPasswordTest::echo, "hello").remote(); Assert.assertEquals("hello", obj.get()); } diff --git a/java/test/src/main/java/io/ray/test/ResourcesManagementTest.java b/java/test/src/main/java/io/ray/test/ResourcesManagementTest.java index c973243de..9066da018 100644 --- a/java/test/src/main/java/io/ray/test/ResourcesManagementTest.java +++ b/java/test/src/main/java/io/ray/test/ResourcesManagementTest.java @@ -6,7 +6,6 @@ import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; import io.ray.api.WaitResult; -import io.ray.api.options.ActorCreationOptions; import io.ray.api.options.CallOptions; import org.testng.Assert; import org.testng.annotations.AfterClass; @@ -42,20 +41,19 @@ public class ResourcesManagementTest extends BaseTest { @Test public void testMethods() { TestUtils.skipTestUnderSingleProcess(); - CallOptions callOptions1 = - new CallOptions.Builder().setResources(ImmutableMap.of("CPU", 4.0)).createCallOptions(); // This is a case that can satisfy required resources. // The static resources for test are "CPU:4,RES-A:4". - ObjectRef result1 = Ray.call(ResourcesManagementTest::echo, 100, callOptions1); + ObjectRef result1 = Ray.task(ResourcesManagementTest::echo, 100) + .setResource("CPU", 4.0) + .remote(); Assert.assertEquals(100, (int) result1.get()); - CallOptions callOptions2 = - new CallOptions.Builder().setResources(ImmutableMap.of("CPU", 4.0)).createCallOptions(); - // This is a case that can't satisfy required resources. // The static resources for test are "CPU:4,RES-A:4". - final ObjectRef result2 = Ray.call(ResourcesManagementTest::echo, 200, callOptions2); + final ObjectRef result2 = Ray.task(ResourcesManagementTest::echo, 200) + .setResource("CPU", 4.0) + .remote(); WaitResult waitResult = Ray.wait(ImmutableList.of(result2), 1, 1000); Assert.assertEquals(1, waitResult.getReady().size()); @@ -63,7 +61,7 @@ public class ResourcesManagementTest extends BaseTest { try { CallOptions callOptions3 = - new CallOptions.Builder().setResources(ImmutableMap.of("CPU", 0.0)).createCallOptions(); + new CallOptions.Builder().setResources(ImmutableMap.of("CPU", 0.0)).build(); Assert.fail(); } catch (RuntimeException e) { // We should receive a RuntimeException indicates that we should not @@ -75,22 +73,21 @@ public class ResourcesManagementTest extends BaseTest { public void testActors() { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions actorCreationOptions1 = new ActorCreationOptions.Builder() - .setResources(ImmutableMap.of("CPU", 2.0)).createActorCreationOptions(); // This is a case that can satisfy required resources. // The static resources for test are "CPU:4,RES-A:4". - ActorHandle echo1 = Ray.createActor(Echo::new, actorCreationOptions1); - final ObjectRef result1 = echo1.call(Echo::echo, 100); + ActorHandle echo1 = Ray.actor(Echo::new) + .setResource("CPU", 2.0) + .remote(); + final ObjectRef result1 = echo1.task(Echo::echo, 100).remote(); Assert.assertEquals(100, (int) result1.get()); // This is a case that can't satisfy required resources. // The static resources for test are "CPU:4,RES-A:4". - ActorCreationOptions actorCreationOptions2 = new ActorCreationOptions.Builder() - .setResources(ImmutableMap.of("CPU", 8.0)).createActorCreationOptions(); - ActorHandle echo2 = - Ray.createActor(Echo::new, actorCreationOptions2); - final ObjectRef result2 = echo2.call(Echo::echo, 100); + Ray.actor(Echo::new) + .setResource("CPU", 8.0) + .remote(); + final ObjectRef result2 = echo2.task(Echo::echo, 100).remote(); WaitResult waitResult = Ray.wait(ImmutableList.of(result2), 1, 1000); Assert.assertEquals(0, waitResult.getReady().size()); diff --git a/java/test/src/main/java/io/ray/test/RuntimeContextTest.java b/java/test/src/main/java/io/ray/test/RuntimeContextTest.java index bc935a6bf..4f0385431 100644 --- a/java/test/src/main/java/io/ray/test/RuntimeContextTest.java +++ b/java/test/src/main/java/io/ray/test/RuntimeContextTest.java @@ -60,9 +60,9 @@ public class RuntimeContextTest extends BaseTest { @Test public void testRuntimeContextInActor() { - ActorHandle actor = Ray.createActor(RuntimeContextTester::new); + ActorHandle actor = Ray.actor(RuntimeContextTester::new).remote(); Assert.assertEquals("ok", - actor.call(RuntimeContextTester::testRuntimeContext, actor.getId()).get()); + actor.task(RuntimeContextTester::testRuntimeContext, actor.getId()).remote().get()); } } diff --git a/java/test/src/main/java/io/ray/test/SingleProcessModeTest.java b/java/test/src/main/java/io/ray/test/SingleProcessModeTest.java index 840feddcb..2c90e3fa1 100644 --- a/java/test/src/main/java/io/ray/test/SingleProcessModeTest.java +++ b/java/test/src/main/java/io/ray/test/SingleProcessModeTest.java @@ -33,9 +33,9 @@ public class SingleProcessModeTest extends BaseTest { List> actors = new ArrayList<>(); Map actorThreadIds = new HashMap<>(); for (int i = 0; i < NUM_ACTOR_INSTANCE; ++i) { - ActorHandle actor = Ray.createActor(MyActor::new); + ActorHandle actor = Ray.actor(MyActor::new).remote(); actors.add(actor); - actorThreadIds.put(actor.getId(), actor.call(MyActor::getThreadId).get()); + actorThreadIds.put(actor.getId(), actor.task(MyActor::getThreadId).remote().get()); } Map>> allResults = new HashMap<>(); @@ -43,7 +43,7 @@ public class SingleProcessModeTest extends BaseTest { final ActorHandle actor = actors.get(i); List> thisActorResult = new ArrayList<>(); for (int j = 0; j < TIMES_TO_CALL_PER_ACTOR; ++j) { - thisActorResult.add(actor.call(MyActor::getThreadId)); + thisActorResult.add(actor.task(MyActor::getThreadId).remote()); } allResults.put(actor.getId(), thisActorResult); } diff --git a/java/test/src/main/java/io/ray/test/StressTest.java b/java/test/src/main/java/io/ray/test/StressTest.java index 3cde937c2..280c7d08f 100644 --- a/java/test/src/main/java/io/ray/test/StressTest.java +++ b/java/test/src/main/java/io/ray/test/StressTest.java @@ -24,7 +24,7 @@ public class StressTest extends BaseTest { for (int i = 0; i < numIterations; i++) { List resultIds = new ArrayList<>(); for (int j = 0; j < numTasks; j++) { - resultIds.add(Ray.call(StressTest::echo, 1).getId()); + resultIds.add(Ray.task(StressTest::echo, 1).remote().getId()); } for (Integer result : Ray.get(resultIds, Integer.class)) { @@ -37,9 +37,9 @@ public class StressTest extends BaseTest { @Test public void testDependency() { TestUtils.skipTestUnderSingleProcess(); - ObjectRef x = Ray.call(StressTest::echo, 1); + ObjectRef x = Ray.task(StressTest::echo, 1).remote(); for (int i = 0; i < 1000; i++) { - x = Ray.call(StressTest::echo, x); + x = Ray.task(StressTest::echo, x).remote(); } Assert.assertEquals(x.get(), Integer.valueOf(1)); @@ -63,7 +63,7 @@ public class StressTest extends BaseTest { public int ping(int n) { List objectIds = new ArrayList<>(); for (int i = 0; i < n; i++) { - objectIds.add(actor.call(Actor::ping).getId()); + objectIds.add(actor.task(Actor::ping).remote().getId()); } int sum = 0; for (Integer result : Ray.get(objectIds, Integer.class)) { @@ -76,11 +76,11 @@ public class StressTest extends BaseTest { @Test public void testSubmittingManyTasksToOneActor() throws Exception { TestUtils.skipTestUnderSingleProcess(); - ActorHandle actor = Ray.createActor(Actor::new); + ActorHandle actor = Ray.actor(Actor::new).remote(); List objectIds = new ArrayList<>(); for (int i = 0; i < 10; i++) { - ActorHandle worker = Ray.createActor(Worker::new, actor); - objectIds.add(worker.call(Worker::ping, 100).getId()); + ActorHandle worker = Ray.actor(Worker::new, actor).remote(); + objectIds.add(worker.task(Worker::ping, 100).remote().getId()); } for (Integer result : Ray.get(objectIds, Integer.class)) { diff --git a/java/test/src/main/java/io/ray/test/TestUtils.java b/java/test/src/main/java/io/ray/test/TestUtils.java index 659db5634..028f3e409 100644 --- a/java/test/src/main/java/io/ray/test/TestUtils.java +++ b/java/test/src/main/java/io/ray/test/TestUtils.java @@ -75,7 +75,7 @@ public class TestUtils { * idle workers in Raylet's worker pool. */ public static void warmUpCluster() { - ObjectRef obj = Ray.call(TestUtils::hi); + ObjectRef obj = Ray.task(TestUtils::hi).remote(); Assert.assertEquals(obj.get(), "hi"); } diff --git a/java/test/src/main/java/io/ray/test/WaitTest.java b/java/test/src/main/java/io/ray/test/WaitTest.java index c1b90237e..96ad4a700 100644 --- a/java/test/src/main/java/io/ray/test/WaitTest.java +++ b/java/test/src/main/java/io/ray/test/WaitTest.java @@ -28,8 +28,8 @@ public class WaitTest extends BaseTest { // Call a task in advance to warm up the cluster to avoid being too slow to start workers. TestUtils.warmUpCluster(); - ObjectRef obj1 = Ray.call(WaitTest::hi); - ObjectRef obj2 = Ray.call(WaitTest::delayedHi); + ObjectRef obj1 = Ray.task(WaitTest::hi).remote(); + ObjectRef obj2 = Ray.task(WaitTest::delayedHi).remote(); List> waitList = ImmutableList.of(obj1, obj2); WaitResult waitResult = Ray.wait(waitList, 2, 2 * 1000); @@ -53,7 +53,7 @@ public class WaitTest extends BaseTest { @Test public void testWaitInWorker() { - ObjectRef res = Ray.call(WaitTest::waitInWorker); + ObjectRef res = Ray.task(WaitTest::waitInWorker).remote(); res.get(); } diff --git a/java/test/src/main/java/io/ray/test/WorkerJvmOptionsTest.java b/java/test/src/main/java/io/ray/test/WorkerJvmOptionsTest.java index 04f97b110..d9ec74b9e 100644 --- a/java/test/src/main/java/io/ray/test/WorkerJvmOptionsTest.java +++ b/java/test/src/main/java/io/ray/test/WorkerJvmOptionsTest.java @@ -3,7 +3,6 @@ package io.ray.test; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; -import io.ray.api.options.ActorCreationOptions; import org.testng.Assert; import org.testng.annotations.Test; @@ -18,13 +17,12 @@ public class WorkerJvmOptionsTest extends BaseTest { @Test public void testJvmOptions() { TestUtils.skipTestUnderSingleProcess(); - ActorCreationOptions options = new ActorCreationOptions.Builder() - // The whitespaces in following argument are intentionally added to test - // that raylet can correctly handle dynamic options with whitespaces. + // The whitespaces in following argument are intentionally added to test + // that raylet can correctly handle dynamic options with whitespaces. + ActorHandle actor = Ray.actor(Echo::new) .setJvmOptions(" -Dtest.suffix=suffix -Dtest.suffix1=suffix1 ") - .createActorCreationOptions(); - ActorHandle actor = Ray.createActor(Echo::new, options); - ObjectRef obj = actor.call(Echo::getOptions); + .remote(); + ObjectRef obj = actor.task(Echo::getOptions).remote(); Assert.assertEquals(obj.get(), "suffix"); } } diff --git a/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java index 686063c95..2b743006e 100644 --- a/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise01.java @@ -29,8 +29,8 @@ public class Exercise01 implements Serializable { // Use `Ray.init` to initialize the Ray runtime. Ray.init(); // Use `Ray.call` to call a remote function. - ObjectRef hello = Ray.call(Exercise01::sayHello); - ObjectRef world = Ray.call(Exercise01::sayWorld); + ObjectRef hello = Ray.task(Exercise01::sayHello).remote(); + ObjectRef world = Ray.task(Exercise01::sayWorld).remote(); System.out.println("First remote call result:" + hello.get()); System.out.println("Second remote call result:" + world.get()); } catch (Throwable t) { diff --git a/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java index 3789fdd92..7dc47009b 100644 --- a/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise02.java @@ -28,10 +28,10 @@ public class Exercise02 { } public static String sayHelloWorld() { - ObjectRef hello = Ray.call(Exercise02::sayHello); - ObjectRef world = Ray.call(Exercise02::sayWorld); + ObjectRef hello = Ray.task(Exercise02::sayHello).remote(); + ObjectRef world = Ray.task(Exercise02::sayWorld).remote(); // Pass unfinished results as the parameters to another remote function. - return Ray.call(Exercise02::merge, hello, world).get(); + return Ray.task(Exercise02::merge, hello, world).remote().get(); } public static void main(String[] args) throws Exception { diff --git a/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java index 3b6b37b44..cebf9a0a3 100644 --- a/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise03.java @@ -14,7 +14,7 @@ public class Exercise03 { public static String sayHelloWithWorld() { String ret = "hello"; System.out.println(ret); - ObjectRef world = Ray.call(Exercise03::sayWorld); + ObjectRef world = Ray.task(Exercise03::sayWorld).remote(); return ret + "," + world.get(); } @@ -30,7 +30,7 @@ public class Exercise03 { public static void main(String[] args) throws Exception { try { Ray.init(); - String helloWithWorld = Ray.call(Exercise03::sayHelloWithWorld).get(); + String helloWithWorld = Ray.task(Exercise03::sayHelloWithWorld).remote().get(); System.out.println(helloWithWorld); } catch (Throwable t) { t.printStackTrace(); diff --git a/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java index f5d921e75..fbed4725c 100644 --- a/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise04.java @@ -39,9 +39,9 @@ public class Exercise04 { try { Ray.init(); List> waitList = ImmutableList.of( - Ray.call(Exercise04::f1), - Ray.call(Exercise04::f2), - Ray.call(Exercise04::f3) + Ray.task(Exercise04::f1).remote(), + Ray.task(Exercise04::f2).remote(), + Ray.task(Exercise04::f3).remote() ); // Ray.wait will block until specified number of results are ready // or specified timeout have passed. diff --git a/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java b/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java index 42d038ce1..e89412770 100644 --- a/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java +++ b/java/tutorial/src/main/java/io/ray/exercise/Exercise05.java @@ -13,11 +13,11 @@ public class Exercise05 { try { Ray.init(); // `Ray.createActor` creates an actor instance. - ActorHandle adder = Ray.createActor(Adder::new, 0); - // Use `Ray.call(actor, parameters)` to call an actor method. - ObjectRef result1 = adder.call(Adder::add, 1); + ActorHandle adder = Ray.actor(Adder::new, 0).remote(); + // Use `Ray.task(actor, parameters).remote()` to call an actor method. + ObjectRef result1 = adder.task(Adder::add, 1).remote(); System.out.println(result1.get()); - ObjectRef result2 = adder.call(Adder::add, 10); + ObjectRef result2 = adder.task(Adder::add, 10).remote(); System.out.println(result2.get()); } catch (Throwable t) { t.printStackTrace(); diff --git a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/client/JobClientImpl.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/client/JobClientImpl.java index 0a5f7ddb5..099be886e 100644 --- a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/client/JobClientImpl.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/client/JobClientImpl.java @@ -3,7 +3,6 @@ package io.ray.streaming.runtime.client; import io.ray.api.ActorHandle; import io.ray.api.ObjectRef; import io.ray.api.Ray; -import io.ray.api.options.ActorCreationOptions; import io.ray.streaming.client.JobClient; import io.ray.streaming.jobgraph.JobGraph; import io.ray.streaming.runtime.config.global.CommonConfig; @@ -27,10 +26,6 @@ public class JobClientImpl implements JobClient { LOG.info("Submitting job [{}] with job graph [{}] and job config [{}].", jobGraph.getJobName(), jobGraph, jobConfig); Map resources = new HashMap<>(); - ActorCreationOptions options = new ActorCreationOptions.Builder() - .setResources(resources) - .setMaxRestarts(-1) - .createActorCreationOptions(); // set job name and id at start jobConfig.put(CommonConfig.JOB_ID, Ray.getRuntimeContext().getCurrentJobId().toString()); @@ -39,11 +34,14 @@ public class JobClientImpl implements JobClient { jobGraph.getJobConfig().putAll(jobConfig); // create job master actor - this.jobMasterActor = Ray.createActor(JobMaster::new, jobConfig, options); + this.jobMasterActor = Ray.actor(JobMaster::new, jobConfig) + .setResources(resources) + .setMaxRestarts(-1) + .remote(); try { - ObjectRef submitResult = jobMasterActor.call(JobMaster::submitJob, - jobMasterActor, jobGraph); + ObjectRef submitResult = jobMasterActor.task(JobMaster::submitJob, + jobMasterActor, jobGraph).remote(); if (submitResult.get()) { LOG.info("Finish submitting job: {}.", jobGraph.getJobName()); diff --git a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/controller/WorkerLifecycleController.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/controller/WorkerLifecycleController.java index fe7963d98..dadb674ec 100644 --- a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/controller/WorkerLifecycleController.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/master/scheduler/controller/WorkerLifecycleController.java @@ -6,7 +6,6 @@ import io.ray.api.Ray; import io.ray.api.WaitResult; import io.ray.api.function.PyActorClass; import io.ray.api.id.ActorId; -import io.ray.api.options.ActorCreationOptions; import io.ray.streaming.api.Language; import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionGraph; import io.ray.streaming.runtime.core.graph.executiongraph.ExecutionVertex; @@ -46,17 +45,18 @@ public class WorkerLifecycleController { Language language = executionVertex.getLanguage(); - ActorCreationOptions options = new ActorCreationOptions.Builder() - .setResources(executionVertex.getResource()) - .setMaxRestarts(-1) - .createActorCreationOptions(); - BaseActorHandle actor; if (Language.JAVA == language) { - actor = Ray.createActor(JobWorker::new, options); + actor = Ray.actor(JobWorker::new) + .setResources(executionVertex.getResource()) + .setMaxRestarts(-1) + .remote(); } else { - actor = Ray.createActor( - new PyActorClass("ray.streaming.runtime.worker", "JobWorker")); + actor = Ray.actor(new PyActorClass( + "ray.streaming.runtime.worker", "JobWorker")) + .setResources(executionVertex.getResource()) + .setMaxRestarts(-1) + .remote(); } if (null == actor) { diff --git a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/rpc/RemoteCallWorker.java b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/rpc/RemoteCallWorker.java index 33e6771c0..b372ddbb2 100644 --- a/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/rpc/RemoteCallWorker.java +++ b/streaming/java/streaming-runtime/src/main/java/io/ray/streaming/runtime/rpc/RemoteCallWorker.java @@ -32,11 +32,11 @@ public class RemoteCallWorker { // python if (actor instanceof PyActorHandle) { - result = ((PyActorHandle) actor).call( - new PyActorMethod("init", Object.class), context.getPythonWorkerContextBytes()); + result = ((PyActorHandle) actor).task(new PyActorMethod("init", Object.class), + context.getPythonWorkerContextBytes()).remote(); } else { // java - result = ((ActorHandle) actor).call(JobWorker::init, context); + result = ((ActorHandle) actor).task(JobWorker::init, context).remote(); } LOG.info("Finished calling worker to initiate."); @@ -55,10 +55,11 @@ public class RemoteCallWorker { // python if (actor instanceof PyActorHandle) { - result = ((PyActorHandle) actor).call(new PyActorMethod("start", Object.class)); + result = ((PyActorHandle) actor) + .task(new PyActorMethod("start", Object.class)).remote(); } else { // java - result = ((ActorHandle) actor).call(JobWorker::start); + result = ((ActorHandle) actor).task(JobWorker::start).remote(); } LOG.info("Finished calling worker to start."); diff --git a/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java index a117c0a86..7dcccc735 100644 --- a/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/StreamingQueueTest.java @@ -3,8 +3,6 @@ package io.ray.streaming.runtime.streamingqueue; import com.google.common.collect.ImmutableMap; import io.ray.api.ActorHandle; import io.ray.api.Ray; -import io.ray.api.options.ActorCreationOptions; -import io.ray.api.options.ActorCreationOptions.Builder; import io.ray.runtime.config.RayConfig; import io.ray.streaming.api.context.StreamingContext; import io.ray.streaming.api.function.impl.FlatMapFunction; @@ -30,7 +28,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Assert; import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -89,19 +86,15 @@ public class StreamingQueueTest extends BaseUnitTest implements Serializable { // ray init Ray.init(); - ActorCreationOptions.Builder builder = new Builder(); - - ActorHandle writerActor = Ray.createActor(WriterWorker::new, "writer", - builder.createActorCreationOptions()); - ActorHandle readerActor = Ray.createActor(ReaderWorker::new, "reader", - builder.createActorCreationOptions()); + ActorHandle writerActor = Ray.actor(WriterWorker::new, "writer").remote(); + ActorHandle readerActor = Ray.actor(ReaderWorker::new, "reader").remote(); LOGGER.info("call getName on writerActor: {}", - writerActor.call(WriterWorker::getName).get()); + writerActor.task(WriterWorker::getName).remote().get()); LOGGER.info("call getName on readerActor: {}", - readerActor.call(ReaderWorker::getName).get()); + readerActor.task(ReaderWorker::getName).remote().get()); - // LOGGER.info(writerActor.call(WriterWorker::testCallReader, readerActor).get()); + // LOGGER.info(writerActor.task(WriterWorker::testCallReader, readerActor).remote().get()); List outputQueueList = new ArrayList<>(); List inputQueueList = new ArrayList<>(); int queueNum = 2; @@ -114,17 +107,17 @@ public class StreamingQueueTest extends BaseUnitTest implements Serializable { } final int msgCount = 100; - readerActor.call(ReaderWorker::init, inputQueueList, writerActor, msgCount); + readerActor.task(ReaderWorker::init, inputQueueList, writerActor, msgCount).remote(); try { Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } - writerActor.call(WriterWorker::init, outputQueueList, readerActor, msgCount); + writerActor.task(WriterWorker::init, outputQueueList, readerActor, msgCount).remote(); long time = 0; while (time < 20000 && - readerActor.call(ReaderWorker::getTotalMsg).get() < msgCount * queueNum) { + readerActor.task(ReaderWorker::getTotalMsg).remote().get() < msgCount * queueNum) { try { Thread.sleep(1000); time += 1000; @@ -134,7 +127,7 @@ public class StreamingQueueTest extends BaseUnitTest implements Serializable { } Assert.assertEquals( - readerActor.call(ReaderWorker::getTotalMsg).get().intValue(), + readerActor.task(ReaderWorker::getTotalMsg).remote().get().intValue(), msgCount * queueNum); } diff --git a/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java index ea37ca90e..f7427e999 100644 --- a/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java +++ b/streaming/java/streaming-runtime/src/test/java/io/ray/streaming/runtime/streamingqueue/Worker.java @@ -191,7 +191,7 @@ class WriterWorker extends Worker { } public String testCallReader(ActorHandle readerActor) { - String name = readerActor.call(ReaderWorker::getName).get(); + String name = readerActor.task(ReaderWorker::getName).remote().get(); LOGGER.info("testCallReader: {}", name); return name; } @@ -211,7 +211,7 @@ class WriterWorker extends Worker { int count = 3; while (count-- != 0) { - peer.call(ReaderWorker::testRayCall).get(); + peer.task(ReaderWorker::testRayCall).remote().get(); } try {