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