public interface SelectStrategy
Modifier and Type | Field and Description |
---|---|
static int |
BUSY_WAIT
Indicates the IO loop to poll for new events without blocking.
|
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
static final int BUSY_WAIT
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–2024 The Netty Project. All rights reserved.