public void cancel() {
if (STATUS_UPDATER.compareAndSet(this, ALLOCATED_AND_ALIVE, CANCELLED)) {
// kill all tasks currently running in this slot
Execution exec = this.executedTask;
if (exec != null && !exec.isFinished()) {
exec.fail(new Exception("The slot in which the task was scheduled has been killed (probably loss of TaskManager)."));
}
}
}
public void releaseSlot() {