[Java] Support calling functions returning void (#5494)

This commit is contained in:
Hao Chen
2019-08-23 21:10:15 +08:00
committed by GitHub
parent 7812dd5636
commit 239c177fe8
27 changed files with 1603 additions and 112 deletions
File diff suppressed because it is too large Load Diff
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc0<R> extends RayFunc {
R apply();
R apply() throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc1<T0, R> extends RayFunc {
R apply(T0 t0);
R apply(T0 t0) throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc2<T0, T1, R> extends RayFunc {
R apply(T0 t0, T1 t1);
R apply(T0 t0, T1 t1) throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc3<T0, T1, T2, R> extends RayFunc {
R apply(T0 t0, T1 t1, T2 t2);
R apply(T0 t0, T1 t1, T2 t2) throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc4<T0, T1, T2, T3, R> extends RayFunc {
R apply(T0 t0, T1 t1, T2 t2, T3 t3);
R apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc5<T0, T1, T2, T3, T4, R> extends RayFunc {
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4);
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Exception;
}
@@ -7,5 +7,6 @@ package org.ray.api.function;
*/
@FunctionalInterface
public interface RayFunc6<T0, T1, T2, T3, T4, T5, R> extends RayFunc {
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5);
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Exception;
}
@@ -0,0 +1,8 @@
package org.ray.api.function;
/**
* Interface of all `RayFuncVoidX` classes.
*/
public interface RayFuncVoid extends RayFunc {
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 0 parameter.
*/
@FunctionalInterface
public interface RayFuncVoid0 extends RayFuncVoid {
void apply() throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 1 parameter.
*/
@FunctionalInterface
public interface RayFuncVoid1<T0> extends RayFuncVoid {
void apply(T0 t0) throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 2 parameters.
*/
@FunctionalInterface
public interface RayFuncVoid2<T0, T1> extends RayFuncVoid {
void apply(T0 t0, T1 t1) throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 3 parameters.
*/
@FunctionalInterface
public interface RayFuncVoid3<T0, T1, T2> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2) throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 4 parameters.
*/
@FunctionalInterface
public interface RayFuncVoid4<T0, T1, T2, T3> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 5 parameters.
*/
@FunctionalInterface
public interface RayFuncVoid5<T0, T1, T2, T3, T4> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Exception;
}
@@ -0,0 +1,12 @@
// generated automatically, do not modify.
package org.ray.api.function;
/**
* Functional interface for a remote function that has 6 parameters.
*/
@FunctionalInterface
public interface RayFuncVoid6<T0, T1, T2, T3, T4, T5> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Exception;
}