/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Pause UDPNIOTransport, so I/O events coming on its {@link org.glassfish.grizzly.nio.transport.UDPNIOConnection}s * will not be processed. Use {@link #resume()} in order to resume UDPNIOTransport processing. * * The transport will be paused only if its current state is {@link org.glassfish.grizzly.Transport.State#STARTED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void pause() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.STARTED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_START_STATE_EXCEPTION()); return; } state.setState(State.PAUSING); notifyProbesBeforePause(this); state.setState(State.PAUSED); notifyProbesPause(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * Resume UDPNIOTransport, which has been paused before using {@link #pause()}. * * The transport will be resumed only if its current state is {@link org.glassfish.grizzly.Transport.State#PAUSED}, * otherwise the call will be ignored without exception thrown and the transport * state will remain the same as it was before the method call. */ @Override public void resume() { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { if (state.getState() != State.PAUSED) { LOGGER.log(Level.WARNING, LogMessages.WARNING_GRIZZLY_TRANSPORT_NOT_PAUSE_STATE_EXCEPTION()); return; } state.setState(State.STARTING); notifyProbesBeforeResume(this); state.setState(State.STARTED); notifyProbesResume(this); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }
/** * {@inheritDoc} */ @Override public void shutdownNow() throws IOException { final Lock lock = state.getStateLocker().writeLock(); lock.lock(); try { final State stateNow = state.getState(); if (stateNow == State.STOPPED) { return; } if (stateNow == State.PAUSED) { // if Transport is paused - first we need to resume it // so selectorrunners can perform the close phase resume(); } state.setState(State.STOPPING); unbindAll(); finalizeShutdown(); } finally { lock.unlock(); } }