Package io.lettuce.core.resource
Class IOUringProvider
- java.lang.Object
-
- io.lettuce.core.resource.IOUringProvider
-
public class IOUringProvider extends Object
Wraps and provides io_uring classes. This is to protect the user fromClassNotFoundException
's caused by the absence of the netty-incubator-transport-native-io_uring library during runtime. Internal API.- Since:
- 6.1
- Author:
- Mark Paluch
-
-
Constructor Summary
Constructors Constructor Description IOUringProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
applyKeepAlive(Bootstrap bootstrap, int count, Duration idle, Duration interval)
Apply Keep-Alive options.static void
applyTcpUserTimeout(Bootstrap bootstrap, Duration timeout)
Apply TcpUserTimeout options.static EventLoopResources
getResources()
Returns theEventLoopResources
for io_uring-backed transport.static boolean
isAvailable()
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
- Returns:
true
if io_uring is available.
-
getResources
public static EventLoopResources getResources()
Returns theEventLoopResources
for io_uring-backed transport. Check availability withisAvailable()
prior to obtaining the resources.- Returns:
- the
EventLoopResources
. May be unavailable.
-
applyKeepAlive
public static void applyKeepAlive(Bootstrap bootstrap, int count, Duration idle, Duration interval)
Apply Keep-Alive options.- Since:
- 6.1
-
-