mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 11:51:09 +08:00
Add a flag to disable reconstruction for a killed actor (#7346)
This commit is contained in:
@@ -181,16 +181,6 @@ public final class Ray extends RayCall {
|
||||
runtime.setResource(resourceName, capacity, UniqueId.NIL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the actor immediately. This will cause any outstanding tasks submitted to the actor to
|
||||
* fail and the actor to exit in the same way as if it crashed.
|
||||
*
|
||||
* @param actor The actor to be killed.
|
||||
*/
|
||||
public static void killActor(RayActor<?> actor) {
|
||||
runtime.killActor(actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the runtime context.
|
||||
*/
|
||||
|
||||
@@ -33,4 +33,13 @@ public interface RayActor<A> extends ActorCall<A> {
|
||||
*/
|
||||
ActorId getId();
|
||||
|
||||
/**
|
||||
* Kill the actor immediately. This will cause any outstanding tasks submitted to the actor to
|
||||
* fail and the actor to exit in the same way as if it crashed.
|
||||
*
|
||||
* @param noReconstruction If set to true, the killed actor will not be reconstructed anymore.
|
||||
*/
|
||||
default void kill(boolean noReconstruction) {
|
||||
Ray.internal().killActor(this, noReconstruction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,9 @@ public interface RayRuntime {
|
||||
* Kill the actor immediately.
|
||||
*
|
||||
* @param actor The actor to be killed.
|
||||
* @param noReconstruction If set to true, the killed actor will not be reconstructed anymore.
|
||||
*/
|
||||
void killActor(RayActor<?> actor);
|
||||
void killActor(RayActor<?> actor, boolean noReconstruction);
|
||||
|
||||
/**
|
||||
* Invoke a remote function.
|
||||
|
||||
Reference in New Issue
Block a user