Package com.gmt2001.dns
Class EventLoopDetector
java.lang.Object
com.gmt2001.dns.EventLoopDetector
Detects if an operating system specific
EventLoopGroup
is available- Author:
- gmt2001
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
Indicates ifEpoll
, the LinuxEventLoopGroup
, is availablestatic final boolean
Indicates ifKQueue
, the macOSEventLoopGroup
, is available -
Method Summary
Modifier and TypeMethodDescriptionstatic EventLoopGroup
If an operating system specificEventLoopGroup
is available, returns a new instance of itReturns the class which should be used forChannel
, associated with theEventLoopGroup
static Class<? extends ServerChannel>
Returns the class which should be used forServerChannel
, associated with theEventLoopGroup
-
Field Details
-
ISEPOLLAVAILABLE
public static final boolean ISEPOLLAVAILABLEIndicates ifEpoll
, the LinuxEventLoopGroup
, is available -
ISKQUEUEAVAILABLE
public static final boolean ISKQUEUEAVAILABLEIndicates ifKQueue
, the macOSEventLoopGroup
, is available
-
-
Method Details
-
createEventLoopGroup
If an operating system specificEventLoopGroup
is available, returns a new instance of itOtherwise, returns an instance of
NioEventLoopGroup
- Returns:
- the
EventLoopGroup
-
getServerChannelClass
Returns the class which should be used forServerChannel
, associated with theEventLoopGroup
- Returns:
- the server channel class
-
getChannelClass
Returns the class which should be used forChannel
, associated with theEventLoopGroup
- Returns:
- the channel class
-