Class 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 Detail

      • 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:
        Constant Field Values
      • TFO_ENABLED_SERVER_MASK

        private static final int TFO_ENABLED_SERVER_MASK
        See Also:
        Constant Field Values
      • 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.
      • TCP_MD5SIG_MAXKEYLEN

        public static final int TCP_MD5SIG_MAXKEYLEN
      • KERNEL_VERSION

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

      • Native

        private Native()
    • Method Detail

      • registerUnix

        private static int registerUnix()
      • 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)
      • 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
      • 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)
      • sizeofEpollEvent

        public static int sizeofEpollEvent()
      • offsetofEpollData

        public static int offsetofEpollData()
      • loadNativeLibrary

        private static void loadNativeLibrary()