1
2
3 package org.galagosearch.tupleflow.execution;
4
5 import java.util.Collections;
6 import java.util.List;
7
8 /***
9 * A dummy execution status object that wraps an error.
10 *
11 * @author trevor
12 */
13 public class ErrorExecutionStatus implements StageExecutionStatus {
14 List<Exception> exceptions;
15 String name;
16
17 public ErrorExecutionStatus(String name, Exception e) {
18 this.name = name;
19 this.exceptions = Collections.singletonList(e);
20 }
21
22 public String getName() { return name; }
23 public int getBlockedInstances() { return 0; }
24 public int getQueuedInstances() { return 0; }
25 public int getRunningInstances() { return 0; }
26 public int getCompletedInstances() { return 0; }
27 public boolean isDone() { return true; }
28 public List<Exception> getExceptions() { return exceptions; }
29 }