protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
protected void exceptionIfNotActive() { if (!status.equals(Status.ACTIVE)) throw new IllegalStateException(String.format("not active: %s", this)); }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }
/** * @return false if any dependencies are inactive, or we are inactive, or we have a global * exception. */ protected boolean shouldDoWork() { try { exceptionIfDependenciesNotActive(); } catch (IllegalStateException e) { return false; } return status.equals(Status.ACTIVE) && exception.get() == null; }