- java.lang.Object
-
- io.netty5.channel.kqueue.KQueue
-
@UnstableApi public final class KQueue extends Object
If KQueue is available the JNI resources will be loaded when this class loads.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
ensureAvailability()
Ensure thatnetty-transport-native-kqueue
is available.static boolean
isAvailable()
Returnstrue
if and only if thenetty-transport-native-kqueue
is available.static boolean
isTcpFastOpenClientSideAvailable()
Returnstrue
if the kqueue native transport is both available and supports client-side TCP FastOpen.static boolean
isTcpFastOpenServerSideAvailable()
Returnstrue
if the kqueue native transport is both available and supports server-side TCP FastOpen.static Throwable
unavailabilityCause()
Returns the cause of unavailability ofnetty-transport-native-kqueue
.
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
Returnstrue
if and only if thenetty-transport-native-kqueue
is available.
-
ensureAvailability
public static void ensureAvailability()
Ensure thatnetty-transport-native-kqueue
is available.- Throws:
UnsatisfiedLinkError
- if unavailable
-
unavailabilityCause
public static Throwable unavailabilityCause()
Returns the cause of unavailability ofnetty-transport-native-kqueue
.- Returns:
- the cause if unavailable.
null
if available.
-
isTcpFastOpenClientSideAvailable
public static boolean isTcpFastOpenClientSideAvailable()
Returnstrue
if the kqueue native transport is both available and supports client-side TCP FastOpen.- Returns:
true
if it's possible to use client-side TCP FastOpen via kqueue, otherwisefalse
.
-
isTcpFastOpenServerSideAvailable
public static boolean isTcpFastOpenServerSideAvailable()
Returnstrue
if the kqueue native transport is both available and supports server-side TCP FastOpen.- Returns:
true
if it's possible to use server-side TCP FastOpen via kqueue, otherwisefalse
.
-
-