@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
@Override public boolean addShutdownListener(final GracefulShutdownListener shutdownListener) { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow != State.STOPPING || stateNow != State.STOPPED) { if (shutdownListeners == null) { shutdownListeners = new HashSet<GracefulShutdownListener>(); } return shutdownListeners.add(shutdownListener); } return false; } finally { lock.unlock(); } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }
private void rebindAddress(final Connection connection) throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (Thread.currentThread().isInterrupted()) { Thread.interrupted(); } //noinspection SuspiciousMethodCalls if (serverConnections.remove(connection)) { final SocketAddress address = (SocketAddress) connection.getLocalAddress(); bind(address); } } finally { lock.unlock(); } } }