/** * {@inheritDoc} */ @Override public final void add(S session) { if (disposed || disposing) { throw new IllegalStateException("Already disposed."); } // Adds the session to the newSession queue and starts the worker newSessions.add(session); startupProcessor(); }
/** * {@inheritDoc} */ @Override public final void add(S session) { if (disposed || disposing) { throw new IllegalStateException("Already disposed."); } // Adds the session to the newSession queue and starts the worker newSessions.add(session); startupProcessor(); }
/** * {@inheritDoc} */ @Override public final void remove(S session) { scheduleRemove(session); startupProcessor(); }
/** * {@inheritDoc} */ public final void remove(T session) { scheduleRemove(session); startupProcessor(); }
/** * {@inheritDoc} */ @Override public final void remove(S session) { scheduleRemove(session); startupProcessor(); }
/** * {@inheritDoc} */ @Override public final void dispose() { if (disposed || disposing) { return; } synchronized (disposalLock) { disposing = true; startupProcessor(); } disposalFuture.awaitUninterruptibly(); disposed = true; }
/** * {@inheritDoc} */ public final void add(T session) { if (isDisposing()) { throw new IllegalStateException("Already disposed."); } // Adds the session to the newSession queue and starts the worker // newSessions.add must precede startupProcessor // for nSessions==0 case in Processor main loop newSessions.add(session); startupProcessor(); }
/** * {@inheritDoc} */ @Override public final void dispose() { if (disposed || disposing) { return; } synchronized (disposalLock) { disposing = true; startupProcessor(); } disposalFuture.awaitUninterruptibly(); disposed = true; }
/** * {@inheritDoc} */ public final void dispose() { if (disposed) { return; } synchronized (disposalLock) { if (!disposing) { disposing = true; startupProcessor(); } } disposalFuture.awaitUninterruptibly(); disposed = true; }