Package io.netty.channel.epoll
Class Native
- java.lang.Object
-
- io.netty.channel.epoll.Native
-
public final class Native extends java.lang.ObjectNative helper methodsInternal usage only!
Static members which call JNI methods must be defined in
NativeStaticallyReferencedJniMethods.
-
-
Field Summary
Fields Modifier and Type Field Description static intEPOLLERRstatic intEPOLLETstatic intEPOLLINstatic intEPOLLOUTstatic intEPOLLRDHUP(package private) static java.net.InetAddressINET_ANY(package private) static java.net.InetAddressINET6_ANY(package private) static booleanIS_SUPPORTING_RECVMMSGstatic booleanIS_SUPPORTING_SENDMMSGstatic booleanIS_SUPPORTING_TCP_FASTOPENDeprecated.(package private) static booleanIS_SUPPORTING_TCP_FASTOPEN_CLIENTtcp_fastopen client mode enabled state.(package private) static booleanIS_SUPPORTING_TCP_FASTOPEN_SERVERtcp_fastopen server mode enabled state.(package private) static booleanIS_SUPPORTING_UDP_SEGMENTstatic java.lang.StringKERNEL_VERSIONprivate static InternalLoggerloggerprivate static intTCP_FASTOPEN_MODEstatic intTCP_MD5SIG_MAXKEYLENprivate static intTFO_ENABLED_CLIENT_MASKprivate static intTFO_ENABLED_SERVER_MASK
-
Constructor Summary
Constructors Modifier Constructor Description privateNative()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intepollBusyWait(FileDescriptor epollFd, EpollEventArray events)Non-blocking variant ofepollWait(FileDescriptor, EpollEventArray, FileDescriptor, int, int)that will also hint to processor we are in a busy-wait loop.private static intepollBusyWait0(int efd, long address, int len)private static intepollCreate()static voidepollCtlAdd(int efd, int fd, int flags)private static intepollCtlAdd0(int efd, int fd, int flags)static voidepollCtlDel(int efd, int fd)private static intepollCtlDel0(int efd, int fd)static voidepollCtlMod(int efd, int fd, int flags)private static intepollCtlMod0(int efd, int fd, int flags)(package private) static intepollReady(long result)(package private) static booleanepollTimerWasUsed(long result)private static intepollWait(int efd, long address, int len, int timeout)(package private) static intepollWait(FileDescriptor epollFd, EpollEventArray events, boolean immediatePoll)(package private) static intepollWait(FileDescriptor epollFd, EpollEventArray events, int timeoutMillis)This uses epoll's own timeout and does not reset/re-arm any timerfdstatic intepollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs)Deprecated.this method is no longer supported.(package private) static longepollWait(FileDescriptor epollFd, EpollEventArray events, FileDescriptor timerFd, int timeoutSec, int timeoutNs, long millisThreshold)private static longepollWait0(int efd, long address, int len, int timerFd, int timeoutSec, int timeoutNs, long millisThreshold)private static inteventFd()static voideventFdRead(int fd)static voideventFdWrite(int fd, long value)private static booleanisSupportingUdpSegment()private static voidloadNativeLibrary()static FileDescriptornewEpollCreate()static FileDescriptornewEventFd()static FileDescriptornewTimerFd()static intoffsetofEpollData()(package private) static intrecvmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)private static intrecvmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)(package private) static intrecvmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket packet)private static intrecvmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket msg)private static intregisterUnix()(package private) static intsendmmsg(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)static intsendmmsg(int fd, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)Deprecated.private static intsendmmsg0(int fd, boolean ipv6, NativeDatagramPacketArray.NativeDatagramPacket[] msgs, int offset, int len)static intsizeofEpollEvent()static intsplice(int fd, long offIn, int fdOut, long offOut, long len)private static intsplice0(int fd, long offIn, int fdOut, long offOut, long len)private static inttimerFd()
-
-
-
Field Detail
-
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:
- 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.
-
IS_SUPPORTING_TCP_FASTOPEN
@Deprecated public static final boolean IS_SUPPORTING_TCP_FASTOPEN
Deprecated.
-
TCP_MD5SIG_MAXKEYLEN
public static final int TCP_MD5SIG_MAXKEYLEN
-
KERNEL_VERSION
public static final java.lang.String KERNEL_VERSION
-
-
Method Detail
-
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 ofepollWait(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.IOExceptionDeprecated.- 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()
-
-