void closeInboundMessage() { int oldState = incrementState(-ONE_INBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed inbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed inbound message on %s", this); } }
void closeOutboundMessage() { int oldState = incrementState(- ONE_OUTBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed outbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed outbound message on %s", this); } }
boolean closeWrites() { int oldState, newState; do { oldState = channelState; if ((oldState & WRITE_CLOSED) != 0) { return false; } newState = oldState | WRITE_CLOSED; } while (!casState(oldState, newState)); if (oldState == READ_CLOSED) { // no channels and read was closed log.tracef("Closed channel writes on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel writes on %s", this); } return true; }
void closeReads() { int oldState, newState; do { oldState = channelState; if ((oldState & READ_CLOSED) != 0) { return; } newState = oldState | READ_CLOSED; } while (!casState(oldState, newState)); if (oldState == WRITE_CLOSED) { // no channels log.tracef("Closed channel reads on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel reads on %s", this); } notifyEnd(); }
unregister(); } else { log.tracef("Closed channel reads and writes on %s", this);
void closeOutboundMessage() { int oldState = incrementState(-ONE_OUTBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed outbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed outbound message on %s", this); } }
void closeInboundMessage() { int oldState = incrementState(-ONE_INBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed inbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed inbound message on %s", this); } }
void closeOutboundMessage() { int oldState = incrementState(- ONE_OUTBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed outbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed outbound message on %s", this); } }
void closeInboundMessage() { int oldState = incrementState(-ONE_INBOUND_MESSAGE); if (oldState == (WRITE_CLOSED | READ_CLOSED)) { // no messages left and read & write closed log.tracef("Closed inbound message on %s (unregistering)", this); unregister(); } else { log.tracef("Closed inbound message on %s", this); } }
boolean closeWrites() { int oldState, newState; do { oldState = channelState; if ((oldState & WRITE_CLOSED) != 0) { return false; } newState = oldState | WRITE_CLOSED; } while (!casState(oldState, newState)); if (oldState == READ_CLOSED) { // no channels and read was closed log.tracef("Closed channel writes on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel writes on %s", this); } return true; }
boolean closeWrites() { int oldState, newState; do { oldState = channelState; if ((oldState & WRITE_CLOSED) != 0) { return false; } newState = oldState | WRITE_CLOSED; } while (!casState(oldState, newState)); if (oldState == READ_CLOSED) { // no channels and read was closed log.tracef("Closed channel writes on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel writes on %s", this); } return true; }
void closeReads() { int oldState, newState; do { oldState = channelState; if ((oldState & READ_CLOSED) != 0) { return; } newState = oldState | READ_CLOSED; } while (!casState(oldState, newState)); if (oldState == WRITE_CLOSED) { // no channels log.tracef("Closed channel reads on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel reads on %s", this); } notifyEnd(); }
void closeReads() { int oldState, newState; do { oldState = channelState; if ((oldState & READ_CLOSED) != 0) { return; } newState = oldState | READ_CLOSED; } while (!casState(oldState, newState)); if (oldState == WRITE_CLOSED) { // no channels log.tracef("Closed channel reads on %s (unregistering)", this); unregister(); } else { log.tracef("Closed channel reads on %s", this); } notifyEnd(); }
unregister(); } else { log.tracef("Closed channel reads and writes on %s", this);
unregister(); } else { log.tracef("Closed channel reads and writes on %s", this);