All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ray.api.function.CppActorMethod Maven / Gradle / Ivy

There is a newer version: 2.36.0
Show newest version
package io.ray.api.function;

public class CppActorMethod {
  // The name of this actor method
  public final String methodName;
  // Type of the return value of this actor method
  public final Class returnType;

  private CppActorMethod(String methodName, Class returnType) {
    this.methodName = methodName;
    this.returnType = returnType;
  }

  /**
   * Create a cppthon actor method.
   *
   * @param methodName The name of this actor method
   * @return a cppthon actor method.
   */
  public static CppActorMethod of(String methodName) {
    return of(methodName, Object.class);
  }

  /**
   * Create a cppthon actor method.
   *
   * @param methodName The name of this actor method
   * @param returnType Class of the return value of this actor method
   * @param  The type of the return value of this actor method
   * @return a cppthon actor method.
   */
  public static  CppActorMethod of(String methodName, Class returnType) {
    return new CppActorMethod<>(methodName, returnType);
  }
}