Module lettuce.core

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 from ClassNotFoundException'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 Details

    • EpollProvider

      public EpollProvider()
  • Method Details

    • isAvailable

      public static boolean isAvailable()
      Returns:
      true if epoll is available.
    • getResources

      public static EventLoopResources getResources()
      Returns the EventLoopResources for epoll-backed transport. Check availability with isAvailable() 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