Class Native

java.lang.Object
io.netty.channel.epoll.Native

public final class Native extends java.lang.Object
Native helper methods

Internal usage only!

Static members which call JNI methods must be defined in NativeStaticallyReferencedJniMethods.

  • Field Details

    • logger

      private static final InternalLogger logger
    • INET6_ANY

      static final java.net.InetAddress INET6_ANY
    • INET_ANY

      static final java.net.InetAddress INET_ANY
    • EPOLLIN

      public static final int EPOLLIN
    • EPOLLOUT

      public static final int EPOLLOUT
    • EPOLLRDHUP

      public static final int EPOLLRDHUP
    • EPOLLET

      public static final int EPOLLET
    • EPOLLERR

      public static final int EPOLLERR
    • IS_SUPPORTING_SENDMMSG

      public static final boolean IS_SUPPORTING_SENDMMSG
    • IS_SUPPORTING_RECVMMSG

      static final boolean IS_SUPPORTING_RECVMMSG
    • IS_SUPPORTING_UDP_SEGMENT

      static final boolean IS_SUPPORTING_UDP_SEGMENT
    • TFO_ENABLED_CLIENT_MASK

      private static final int TFO_ENABLED_CLIENT_MASK
      See Also:
    • TFO_ENABLED_SERVER_MASK

      private static final int TFO_ENABLED_SERVER_MASK
      See Also:
    • TCP_FASTOPEN_MODE

      private static final int TCP_FASTOPEN_MODE
    • IS_SUPPORTING_TCP_FASTOPEN_CLIENT

      static final boolean IS_SUPPORTING_TCP_FASTOPEN_CLIENT
      tcp_fastopen client mode enabled state.
    • IS_SUPPORTING_TCP_FASTOPEN_SERVER

      static final boolean IS_SUPPORTING_TCP_FASTOPEN_SERVER
      tcp_fastopen server mode enabled state.
    • IS_SUPPORTING_TCP_FASTOPEN

      @Deprecated public static final boolean IS_SUPPORTING_TCP_FASTOPEN
    • TCP_MD5SIG_MAXKEYLEN

      public static final int TCP_MD5SIG_MAXKEYLEN
    • KERNEL_VERSION

      public static final java.lang.String KERNEL_VERSION
  • Constructor Details

    • Native

      private Native()
  • Method Details

    • registerUnix

      private static int registerUnix()
    • newEventFd

      public static FileDescriptor newEventFd()
    • newTimerFd

      public static FileDescriptor newTimerFd()
    • isSupportingUdpSegment

      private static boolean isSupportingUdpSegment()
    • eventFd

      private static int eventFd()
    • timerFd

      private static int timerFd()
    • eventFdWrite

      public static void eventFdWrite(int fd, long value)
    • eventFdRead

      public static void eventFdRead(int fd)
    • newEpollCreate

      public static FileDescriptor newEpollCreate()
    • epollCreate

      private static int epollCreate()
    • epollWait

      @Deprecated public static int epollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs) throws java.io.IOException
      Deprecated.
      this method is no longer supported. This functionality is internal to this package.
      Throws:
      java.io.IOException
    • epollWait

      static long epollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs, long millisThreshold) throws java.io.IOException
      Throws:
      java.io.IOException
    • epollReady

      static int epollReady(long result)
    • epollTimerWasUsed

      static boolean epollTimerWasUsed(long result)
    • epollWait

      static int epollWait(FileDescriptor epollFd, EpollEventArray events, boolean immediatePoll) throws java.io.IOException
      Throws:
      java.io.IOException
    • epollWait

      static int epollWait(FileDescriptor epollFd, EpollEventArray events, int timeoutMillis) throws java.io.IOException
      This uses epoll's own timeout and does not reset/re-arm any timerfd
      Throws:
      java.io.IOException
    • epollBusyWait

      public static int epollBusyWait(FileDescriptor epollFd, EpollEventArray events) throws java.io.IOException
      Non-blocking variant of epollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int) that will also hint to processor we are in a busy-wait loop.
      Throws:
      java.io.IOException
    • epollWait0

      private static long epollWait0(int efd, long address, int len, int timerFd, int timeoutSec, int timeoutNs, long millisThreshold)
    • epollWait

      private static int epollWait(int efd, long address, int len, int timeout)
    • epollBusyWait0

      private static int epollBusyWait0(int efd, long address, int len)
    • epollCtlAdd

      public static void epollCtlAdd(int efd, int fd, int flags) throws java.io.IOException
      Throws:
      java.io.IOException
    • epollCtlAdd0

      private static int epollCtlAdd0(int efd, int fd, int flags)
    • epollCtlMod

      public static void epollCtlMod(int efd, int fd, int flags) throws java.io.IOException
      Throws:
      java.io.IOException
    • epollCtlMod0

      private static int epollCtlMod0(int efd, int fd, int flags)
    • epollCtlDel

      public static void epollCtlDel(int efd, int fd) throws java.io.IOException
      Throws:
      java.io.IOException
    • epollCtlDel0

      private static int epollCtlDel0(int efd, int fd)
    • splice

      public static int splice(int fd, long offIn, int fdOut, long offOut, long len) throws java.io.IOException
      Throws:
      java.io.IOException
    • splice0

      private static int splice0(int fd, long offIn, int fdOut, long offOut, long len)
    • sendmmsg

      @Deprecated public static int sendmmsg(int fd, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws java.io.IOException
      Deprecated.
      Throws:
      java.io.IOException
    • sendmmsg

      static int sendmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws java.io.IOException
      Throws:
      java.io.IOException
    • sendmmsg0

      private static int sendmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)
    • recvmmsg

      static int recvmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len) throws java.io.IOException
      Throws:
      java.io.IOException
    • recvmmsg0

      private static int recvmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)
    • recvmsg

      static int recvmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket packet) throws java.io.IOException
      Throws:
      java.io.IOException
    • recvmsg0

      private static int recvmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket msg)
    • sizeofEpollEvent

      public static int sizeofEpollEvent()
    • offsetofEpollData

      public static int offsetofEpollData()
    • loadNativeLibrary

      private static void loadNativeLibrary()