Top Description Fields Constructors Methods
reactor.netty5.resources

pack-priv final Class ColocatedEventLoopGroup

extends Object
implements EventLoopGroup, Supplier<EventLoopGroup>
Class Inheritance
All Implemented Interfaces
java.util.function.Supplier, io.netty5.channel.EventLoopGroup, io.netty5.util.concurrent.EventExecutorGroup, java.util.concurrent.Executor, java.lang.Iterable
Imports
java.util.Iterator, java.util.concurrent.TimeUnit, java.util.function.Supplier, io.netty5.channel.EventLoop, .EventLoopGroup, io.netty5.util.concurrent.EventExecutor, .FastThreadLocal, .Future, reactor.util.annotation.Nullable

Reuse local event loop if already working inside one.

Field Summary

Modifier and TypeField and Description
pack-priv final EventLoopGroup
pack-priv final FastThreadLocal<EventLoop>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public EventLoopGroup
get()

Implements java.util.function.Supplier.get.

Gets a result.
public boolean
isShutdown()

Implements io.netty5.util.concurrent.EventExecutorGroup.isShutdown.

Returns true if all EventExecutors managed by this EventExecutorGroup have been shut down gracefully and moved past the grace period so that they are no longer accepting any new tasks.
public boolean
public Iterator<EventExecutor>
iterator()

Implements io.netty5.util.concurrent.EventExecutorGroup.iterator.

Returns an iterator over elements of type T.
public EventLoop
next()

Implements io.netty5.channel.EventLoopGroup.next.

Return the next EventLoop to use
pack-priv EventLoop
public Future<Void>
shutdownGracefully(long
the quiet period as described in the documentation
quietPeriod
,
long
the maximum amount of time to wait until the executor is shutting down regardless if a task was submitted during the quiet period.
timeout
,
TimeUnit
the unit of quietPeriod and timeout
unit
)

Implements io.netty5.util.concurrent.EventExecutorGroup.shutdownGracefully.

Signals this executor that the caller wants the executor to be shut down.
public Future<Void>
terminationFuture()

Implements io.netty5.util.concurrent.EventExecutorGroup.terminationFuture.

Returns the Future which is notified when all EventExecutors managed by this EventExecutorGroup have been terminated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventLoopGroupback to summary
pack-priv final EventLoopGroup eventLoopGroup
localLoopback to summary
pack-priv final FastThreadLocal<EventLoop> localLoop

Constructor Detail

ColocatedEventLoopGroupback to summary
pack-priv ColocatedEventLoopGroup(EventLoopGroup eventLoopGroup)

Method Detail

cleanback to summary
pack-priv void clean()
getback to summary
public EventLoopGroup get()

Implements java.util.function.Supplier.get.

Doc from java.util.function.Supplier.get.

Gets a result.

Returns:EventLoopGroup

a result

Annotations
@Override
isShutdownback to summary
public boolean isShutdown()

Implements io.netty5.util.concurrent.EventExecutorGroup.isShutdown.

Doc from io.netty5.util.concurrent.EventExecutorGroup.isShutdown.

Returns true if all EventExecutors managed by this EventExecutorGroup have been shut down gracefully and moved past the grace period so that they are no longer accepting any new tasks.

An executor group that "is shut down" might still be executing tasks that it has queued up, but it will no longer be accepting any new tasks. Once all running and queued tasks have completed, the executor group will be terminated.

Returns:boolean

true if all executors in this group have shut down and are no longer accepting any new tasks.

Annotations
@Override
isShuttingDownback to summary
public boolean isShuttingDown()

Implements io.netty5.util.concurrent.EventExecutorGroup.isShuttingDown.

Doc from io.netty5.util.concurrent.EventExecutorGroup.isShuttingDown.

Returns true if and only if all EventExecutors managed by this EventExecutorGroup are being shut down gracefully or was shut down.

An executor group that "is shutting down" can still accept new tasks for a little while (the grace period), but will eventually start rejecting new tasks. At that point, the executor group will be shut down.

Returns:boolean

true if all executors in this group have at least started shutting down, otherwise false.

Annotations
@Override
iteratorback to summary
public Iterator<EventExecutor> iterator()

Implements io.netty5.util.concurrent.EventExecutorGroup.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<EventExecutor>

an Iterator.

Annotations
@Override
nextback to summary
public EventLoop next()

Implements io.netty5.channel.EventLoopGroup.next.

Doc from io.netty5.channel.EventLoopGroup.next.

Return the next EventLoop to use

Annotations
@Override
nextInternalback to summary
pack-priv EventLoop nextInternal()
Annotations
@Nullable
shutdownGracefullyback to summary
public Future<Void> shutdownGracefully(long quietPeriod, long timeout, TimeUnit unit)

Implements io.netty5.util.concurrent.EventExecutorGroup.shutdownGracefully.

Doc from io.netty5.util.concurrent.EventExecutorGroup.shutdownGracefully.

Signals this executor that the caller wants the executor to be shut down. Once this method is called, isShuttingDown() starts to return true, and the executor prepares to shut itself down. This method ensures that no tasks are submitted for 'the quiet period' (usually a couple seconds) before it shuts itself down. If a task is submitted during the quiet period, it is guaranteed to be accepted and the quiet period will start over.

Parameters
quietPeriod:long

the quiet period as described in the documentation

timeout:long

the maximum amount of time to wait until the executor is shutting down regardless if a task was submitted during the quiet period.

unit:TimeUnit

the unit of quietPeriod and timeout

Returns:Future<Void>

the terminationFuture()

Annotations
@Override
terminationFutureback to summary
public Future<Void> terminationFuture()

Implements io.netty5.util.concurrent.EventExecutorGroup.terminationFuture.

Doc from io.netty5.util.concurrent.EventExecutorGroup.terminationFuture.

Returns the Future which is notified when all EventExecutors managed by this EventExecutorGroup have been terminated.

Returns:Future<Void>

The Future representing the termination of this EventExecutorGroup.

Annotations
@Override