final protected void addRequest(R request) throws IOException { // check the error state of this channel checkErroneous(); // write the current buffer and get the next one this.requestsNotReturned.incrementAndGet(); if (this.closed || this.requestQueue.isClosed()) { // if we found ourselves closed after the counter increment, // decrement the counter again and do not forward the request this.requestsNotReturned.decrementAndGet(); final NotificationListener listener; synchronized (listenerLock) { listener = allRequestsProcessedListener; allRequestsProcessedListener = null; } if (listener != null) { listener.onNotification(); } throw new IOException("I/O channel already closed. Could not fulfill: " + request); } this.requestQueue.add(request); }
final protected void addRequest(R request) throws IOException { // check the error state of this channel checkErroneous(); // write the current buffer and get the next one this.requestsNotReturned.incrementAndGet(); if (this.closed || this.requestQueue.isClosed()) { // if we found ourselves closed after the counter increment, // decrement the counter again and do not forward the request this.requestsNotReturned.decrementAndGet(); final NotificationListener listener; synchronized (listenerLock) { listener = allRequestsProcessedListener; allRequestsProcessedListener = null; } if (listener != null) { listener.onNotification(); } throw new IOException("I/O channel already closed. Could not fulfill: " + request); } this.requestQueue.add(request); }
final protected void addRequest(R request) throws IOException { // check the error state of this channel checkErroneous(); // write the current buffer and get the next one this.requestsNotReturned.incrementAndGet(); if (this.closed || this.requestQueue.isClosed()) { // if we found ourselves closed after the counter increment, // decrement the counter again and do not forward the request this.requestsNotReturned.decrementAndGet(); final NotificationListener listener; synchronized (listenerLock) { listener = allRequestsProcessedListener; allRequestsProcessedListener = null; } if (listener != null) { listener.onNotification(); } throw new IOException("I/O channel already closed. Could not fulfill: " + request); } this.requestQueue.add(request); }
final protected void addRequest(R request) throws IOException { // check the error state of this channel checkErroneous(); // write the current buffer and get the next one this.requestsNotReturned.incrementAndGet(); if (this.closed || this.requestQueue.isClosed()) { // if we found ourselves closed after the counter increment, // decrement the counter again and do not forward the request this.requestsNotReturned.decrementAndGet(); final NotificationListener listener; synchronized (listenerLock) { listener = allRequestsProcessedListener; allRequestsProcessedListener = null; } if (listener != null) { listener.onNotification(); } throw new IOException("I/O channel already closed (" + this.closed + "," + this.requestQueue.isClosed() + "). Could not fulfill: " + request); } this.requestQueue.add(request); }