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 intThreshold beyond which individual channel/socket polling will swap to using aSelector.static final intDefault threshold beyond which individual channel/socket polling will swap to using aSelector.static final StringSystem property name for the threshold beyond which individual channel/socket polling will swap to using aSelector.protected final SelectorReference to theSelectorfor the transport. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close NioSelector down.voidExplicit 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. -
selector
Reference to theSelectorfor the transport.
-
-
Constructor Details
-
TransportPoller
public TransportPoller()Default constructor.
-
-
Method Details
-
close
public void close()Close NioSelector down. Returns immediately.- Specified by:
closein interfaceAutoCloseable
-
selectNowWithoutProcessing
public void selectNowWithoutProcessing()Explicit call toSelector.selectNow()followed by clearing out the set without processing.
-