@Override public synchronized void stateChanged(Service service) { eventCount++; lastService = service; lastState = service.getServiceState(); stateEventList.add(lastState); if (lastState == failingState) { failureCount++; throw new BreakableService.BrokenLifecycleEvent(service, "Failure entering " + lastState + " for " + service.getName()); } }
@Override public synchronized void stateChanged(Service service) { eventCount++; lastService = service; lastState = service.getServiceState(); stateEventList.add(lastState); if (lastState == failingState) { failureCount++; throw new BreakableService.BrokenLifecycleEvent(service, "Failure entering " + lastState + " for " + service.getName()); } }
private void maybeFail(boolean fail, String action) { if (fail) { throw new BrokenLifecycleEvent(this, action); } }
private void maybeFail(boolean fail, String action) { if (fail) { throw new BrokenLifecycleEvent(this, action); } }