public boolean fail(long id, String reason) { Coordination c = getCoordinationById(id); if (c != null) { return c.fail(new Exception(reason)); } return false; }
void cleanUp() { // terminate coordination timeout timer coordinationTimer.purge(); coordinationTimer.cancel(); // terminate all active coordinations final Exception reason = new Exception(); for (Coordination c : coordinations.values()) { c.fail(reason); } coordinations.clear(); // release all participants participants.clear(); // cannot really clear out the thread local but we can let it go threadStacks = null; }
public void addTimeout(long id, long timeout) { Coordination c = getCoordinationById(id); if (c != null) { c.extendTimeout(timeout); } }