Exemplo n.º 1
0
  private void finish(boolean close) throws BadDescriptorException, IOException {
    try {
      flushWrite();

      if (DEBUG) LOG.info("Descriptor for fileno {} closed by stream", descriptor.getFileno());
    } finally {
      buffer = EMPTY_BUFFER;

      // clear runtime so it doesn't get stuck in memory (JRUBY-2933)
      runtime = null;

      // finish descriptor
      descriptor.finish(close);
    }
  }
Exemplo n.º 2
0
 private static void registerDescriptor(ChannelDescriptor descriptor) {
   filenoDescriptorMap.put(descriptor.getFileno(), descriptor);
 }