Package org.agrona.nio
Class TransportPoller
java.lang.Object
org.agrona.nio.TransportPoller
- All Implemented Interfaces:
AutoCloseable
Implements the common functionality for a transport poller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Threshold beyond which individual channel/socket polling will swap to using aSelector
.static final int
Default threshold beyond which individual channel/socket polling will swap to using aSelector
.static final String
System property name for the threshold beyond which individual channel/socket polling will swap to using aSelector
.protected final Selector
Reference to theSelector
for the transport. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close NioSelector down.void
Explicit call toSelector.selectNow()
followed by clearing out the set without processing.
-
Field Details
-
ITERATION_THRESHOLD_PROP_NAME
System property name for the threshold beyond which individual channel/socket polling will swap to using aSelector
.- See Also:
-
ITERATION_THRESHOLD_DEFAULT
public static final int ITERATION_THRESHOLD_DEFAULTDefault threshold beyond which individual channel/socket polling will swap to using aSelector
.- See Also:
-
ITERATION_THRESHOLD
public static final int ITERATION_THRESHOLDThreshold beyond which individual channel/socket polling will swap to using aSelector
.- See Also:
-
selector
Reference to theSelector
for the transport.
-
-
Constructor Details
-
TransportPoller
public TransportPoller()Default constructor.
-
-
Method Details
-
close
public void close()Close NioSelector down. Returns immediately.- Specified by:
close
in interfaceAutoCloseable
-
selectNowWithoutProcessing
public void selectNowWithoutProcessing()Explicit call toSelector.selectNow()
followed by clearing out the set without processing.
-