public interface SelectStrategy
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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 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.Exception
Copyright © 2008–2017 The Netty Project. All rights reserved.