Package io.netty.util.concurrent
Class DefaultEventExecutorChooserFactory.PowerOfTwoEventExecutorChooser
- java.lang.Object
-
- io.netty.util.concurrent.DefaultEventExecutorChooserFactory.PowerOfTwoEventExecutorChooser
-
- All Implemented Interfaces:
EventExecutorChooserFactory.EventExecutorChooser
- Enclosing class:
- DefaultEventExecutorChooserFactory
private static final class DefaultEventExecutorChooserFactory.PowerOfTwoEventExecutorChooser extends java.lang.Object implements EventExecutorChooserFactory.EventExecutorChooser
-
-
Field Summary
Fields Modifier and Type Field Description private EventExecutor[]
executors
private java.util.concurrent.atomic.AtomicInteger
idx
-
Constructor Summary
Constructors Constructor Description PowerOfTwoEventExecutorChooser(EventExecutor[] executors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventExecutor
next()
Returns the newEventExecutor
to use.
-
-
-
Field Detail
-
idx
private final java.util.concurrent.atomic.AtomicInteger idx
-
executors
private final EventExecutor[] executors
-
-
Constructor Detail
-
PowerOfTwoEventExecutorChooser
PowerOfTwoEventExecutorChooser(EventExecutor[] executors)
-
-
Method Detail
-
next
public EventExecutor next()
Description copied from interface:EventExecutorChooserFactory.EventExecutorChooser
Returns the newEventExecutor
to use.- Specified by:
next
in interfaceEventExecutorChooserFactory.EventExecutorChooser
-
-