Class ChannelFD

java.lang.Object
org.jruby.util.io.ChannelFD
All Implemented Interfaces:
Closeable, AutoCloseable

public class ChannelFD extends Object implements Closeable
Created by headius on 5/24/14.
  • Field Details

    • ch

      public Channel ch
    • chRead

      public ReadableByteChannel chRead
    • chWrite

      public WritableByteChannel chWrite
    • chSeek

      public SeekableByteChannel chSeek
    • chSelect

      public SelectableChannel chSelect
    • chFile

      public FileChannel chFile
    • chSock

      public SocketChannel chSock
    • chNative

      public jnr.enxio.channels.NativeSelectableChannel chNative
    • realFileno

      public int realFileno
    • fakeFileno

      public int fakeFileno
    • refs

      private AtomicInteger refs
    • currentLock

      public ThreadLocal<FileLock> currentLock
    • posix

      private final jnr.posix.POSIX posix
    • isNativeFile

      public boolean isNativeFile
    • filenoUtil

      private final FilenoUtil filenoUtil
    • needsClosing

      private boolean needsClosing
    • maybeHandle

      private boolean maybeHandle
    • openflags

      private final int openflags
  • Constructor Details

    • ChannelFD

      public ChannelFD(Channel fd, jnr.posix.POSIX posix, FilenoUtil filenoUtil, int flags)
    • ChannelFD

      public ChannelFD(Channel fd, jnr.posix.POSIX posix, FilenoUtil filenoUtil)
  • Method Details

    • initFileno

      private void initFileno(boolean allocate)
    • dup

      public ChannelFD dup()
    • dup2From

      public int dup2From(jnr.posix.POSIX posix, ChannelFD dup2Source)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • bestFileno

      public int bestFileno()
    • bestFileno

      public int bestFileno(boolean forceFileno)
    • finish

      private void finish() throws IOException
      Throws:
      IOException
    • initChannelTypes

      private void initChannelTypes()