Package io.lettuce.core.resource
Class EpollProvider
- java.lang.Object
-
- io.lettuce.core.resource.EpollProvider
-
public class EpollProvider extends Object
Wraps and provides Epoll classes. This is to protect the user fromClassNotFoundException
's caused by the absence of the netty-transport-native-epoll library during runtime. Internal API.- Since:
- 4.4
- Author:
- Mark Paluch, Yohei Ueki
-
-
Constructor Summary
Constructors Constructor Description EpollProvider()
-
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 epoll-backed transport.static boolean
isAvailable()
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
- Returns:
true
if epoll is available.
-
getResources
public static EventLoopResources getResources()
Returns theEventLoopResources
for epoll-backed transport. Check availability withisAvailable()
prior to obtaining the resources.- Returns:
- the
EventLoopResources
. May be unavailable. - Since:
- 6.0
-
applyKeepAlive
public static void applyKeepAlive(Bootstrap bootstrap, int count, Duration idle, Duration interval)
Apply Keep-Alive options.- Since:
- 6.1
-
-