private void freeChannel(ChannelControlBlock channel) { int idx = channel.getChannelId(); ccbArray[idx] = null; allocationBitmap.clear(idx); pendingChannelWriteBitmap.clear(idx); pendingChannelCreditsBitmap.clear(idx); pendingChannelSynBitmap.clear(idx); pendingEOSAckBitmap.clear(idx); --openChannelCount; }
/** * Open a channel to the other side. * * @return * @throws NetException * - A network failure occurred. */ public ChannelControlBlock openChannel() throws NetException { synchronized (this) { if (connectionFailure) { throw new NetException(error); } } ChannelControlBlock channel = cSet.allocateChannel(); int channelId = channel.getChannelId(); cSet.initiateChannelSyn(channelId); return channel; }
ccb = readerState.getCCBInCommand(); ccb.reportRemoteEOS(); int channelId = ccb.getChannelId(); cSet.markEOSAck(channelId); cSet.unmarkPendingCredits(channelId); ccb = readerState.getCCBInCommand(); ccb.reportRemoteError(readerState.command.getData()); int channelId = ccb.getChannelId(); cSet.markEOSAck(channelId); cSet.unmarkPendingCredits(channelId);