public void join(String msg) throws MonitorCanceledException { MON.checkMonitor(this); MON.setMonitor(parent); parent.setChild(null); parent.message(msg); done(); }
protected void message(String msg, int level) { if (parent != null) { parent.message(msg, level + 1); } else { trace(msg, level, false); } }
protected void taskChanged(String task, int level) { if (parent != null) { parent.taskChanged(task, level + 1); } else { trace(task, level, true); } }
protected void dump(StringBuilder builder) { builder.append(" "); builder.append(task); builder.append("\n"); if (parent != null) { parent.dump(builder); } }
public void fork(int workFromParent, Runnable runnable, String msg) throws MonitorCanceledException { MON.checkMonitor(this); checkWork(workFromParent); child = subMonitor(workFromParent); MON.setMonitor(child); try { runnable.run(); } finally { MON.checkMonitor(child); MON.setMonitor(this); child.done(); child = null; } work += workFromParent; message(msg); }
protected void setCanceled(boolean canceled) { this.canceled = canceled; if (child != null) { child.setCanceled(canceled); } }