public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }
protected Exception getExceptionFromDependenciesOrNull() { for (LifeCycle dependency : dependencies) { if (dependency.getException() != null) { return dependency.getException(); } } return null; }
@Override public void close() throws IOException { closer.close(); } }
/** * @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; }
@Override public void close() throws IOException { closer.close(); } }
public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }
/** * @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; }
protected Exception getExceptionFromDependenciesOrNull() { for (LifeCycle dependency : dependencies) { if (dependency.getException() != null) { return dependency.getException(); } } return null; }
@Override public void close() throws IOException { closer.close(); } }
public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }
/** * @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; }
protected Exception getExceptionFromDependenciesOrNull() { for (LifeCycle dependency : dependencies) { if (dependency.getException() != null) { return dependency.getException(); } } return null; }
@Override public void close() throws IOException { closer.close(); }
public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }
/** * @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; }
protected Exception getExceptionFromDependenciesOrNull() { for (LifeCycle dependency : dependencies) { if (dependency.getException() != null) { return dependency.getException(); } } return null; }
@Override public void close() throws IOException { closer.close(); } }
public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }
protected Exception getExceptionFromDependenciesOrNull() { for (LifeCycle dependency : dependencies) { if (dependency.getException() != null) { return dependency.getException(); } } return null; }
public void shutdown(long waitMs) { synchronized (this.statusLock) { if (this.status.compareTo(Status.ACTIVE) > 0) { return; } this.status = Status.SHUTDOWN_REQUEST; try { awaitShutdown(waitMs); } catch (InterruptedException ignore) { } } }