@Override public void register(ChannelInstance channelInstance) { final ExecutionStageLoop loop = getExecutionStageLoop(channelInstance.getChannel()); if (loop == null) { final ChannelInstance oldChannelInstance = this.channelInstances.put(channelInstance.getChannel(), channelInstance); channelInstance.noteObtainedReference(); if (oldChannelInstance != null) { oldChannelInstance.noteDiscardedReference(true); } } else { final ExecutionStageLoopContext loopContext = this.getOrCreateLoopContext(loop); loopContext.register(channelInstance); } }