[Java] add default kill option (#10473)

This commit is contained in:
chaokunyang
2020-09-04 10:08:52 +08:00
committed by GitHub
parent 5c3d4a6670
commit 5e4db6ad24
2 changed files with 19 additions and 0 deletions
@@ -14,6 +14,15 @@ public interface BaseActorHandle {
*/
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. The killed actor will not be
* restarted anymore.
*/
default void kill() {
Ray.internal().killActor(this, true);
}
/**
* 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.