[xray] Implement Actor Reconstruction (#3332)

* Implement Actor Reconstruction

* fix

* fix actor handle __del__

* fix lint

* add comment

* Remove actorCreationDummyObjectId

* address comments

* fix

* address comments

* avoid copy

* change log to debug

* fix error name
This commit is contained in:
Hao Chen
2018-12-13 21:28:58 -08:00
committed by Stephanie Wang
parent 2455de78ce
commit e7b51cbd1b
25 changed files with 779 additions and 360 deletions
@@ -1,5 +1,6 @@
package org.ray.api.options;
import java.util.HashMap;
import java.util.Map;
/**
@@ -7,12 +8,24 @@ import java.util.Map;
*/
public class ActorCreationOptions extends BaseTaskOptions {
public static final int NO_RECONSTRUCTION = 0;
public static final int INFINITE_RECONSTRUCTIONS = (int) Math.pow(2, 30);
public final int maxReconstructions;
public ActorCreationOptions() {
super();
this.maxReconstructions = NO_RECONSTRUCTION;
}
public ActorCreationOptions(Map<String, Double> resources) {
super(resources);
this.maxReconstructions = NO_RECONSTRUCTION;
}
public ActorCreationOptions(Map<String, Double> resources, int maxReconstructions) {
super(resources);
this.maxReconstructions = maxReconstructions;
}
}