Top Description Fields Constructors Methods
io.netty.channel

pack-priv final Class DefaultSelectStrategy

extends Object
implements SelectStrategy
Class Inheritance
All Implemented Interfaces
io.netty.channel.SelectStrategy
Imports
io.netty.util.IntSupplier

Default select strategy.

Field Summary

Modifier and TypeField and Description
pack-priv static final SelectStrategy

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
calculateStrategy(IntSupplier
The supplier with the result of a select result.
selectSupplier
,
boolean
true if tasks are waiting to be processed.
hasTasks
)

Implements io.netty.channel.SelectStrategy.calculateStrategy.

The SelectStrategy can be used to steer the outcome of a potential select call.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final SelectStrategy INSTANCE

Constructor Detail

DefaultSelectStrategyback to summary
private DefaultSelectStrategy()

Method Detail

calculateStrategyback to summary
public int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception

Implements io.netty.channel.SelectStrategy.calculateStrategy.

Doc from io.netty.channel.SelectStrategy.calculateStrategy.

The SelectStrategy can be used to steer the outcome of a potential select call.

Parameters
selectSupplier:IntSupplier

The supplier with the result of a select result.

hasTasks:boolean

true if tasks are waiting to be processed.

Returns:int

SELECT if the next step should be blocking select CONTINUE if the next step should be to not select but rather jump back to the IO loop and try again. Any value >= 0 is treated as an indicator that work needs to be done.

Annotations
@Override