public interface SelectStrategy
限定符和类型 | 字段和说明 |
---|---|
static int |
CONTINUE
Indicates the IO loop should be retried, no blocking select to follow directly.
|
static int |
SELECT
Indicates a blocking select should follow.
|
限定符和类型 | 方法和说明 |
---|---|
int |
calculateStrategy(IntSupplier selectSupplier,
boolean hasTasks)
The
SelectStrategy can be used to steer the outcome of a potential select
call. |
static final int SELECT
static final int CONTINUE
int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws java.lang.Exception
SelectStrategy
can be used to steer the outcome of a potential select
call.selectSupplier
- The supplier with the result of a select result.hasTasks
- true if tasks are waiting to be processed.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.java.lang.Exception