private void doActionOnSemaphore(String action, String name, Parse infoCells) { boolean isOk = false; if ("lock".equals(action)) { isOk = lockSemaphore(name); if (!isOk) setForcedAbort(true); } else if ("unlock".equals(action)) isOk = unlockSemaphore(name); else exception(infoCells.parts, new Throwable("Bad action: " + action)); if (isOk) { infoCells.parts.last().more = new Parse("td", makeSemaphoreName(name), null, null); right(infoCells); } else exception(infoCells.parts, new Throwable("Unable to " + action + " semaphore '" + name + "'") ); }
private void doActionOnSemaphore(String action, String name, Parse infoCells) { boolean isOk = false; if ("lock".equals(action)) { isOk = lockSemaphore(name); if (!isOk) setForcedAbort(true); } else if ("unlock".equals(action)) isOk = unlockSemaphore(name); else exception(infoCells.parts, new Throwable("Bad action: " + action)); if (isOk) { infoCells.parts.last().more = new Parse("td", makeSemaphoreName(name), null, null); right(infoCells); } else exception(infoCells.parts, new Throwable("Unable to " + action + " semaphore '" + name + "'") ); }