Interface IOContext
- All Known Implementing Classes:
Netty4IOContext
,Netty5IOContext
public interface IOContext
An I/O context used to abstract the implementation of the IO layer in use.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IOContext
create
(TransportOptions options, SslOptions sslOptions, String ioThreadName) Create an IOContext from the available options.void
shutdown()
Shutdown the event loop synchronously with a grace period for work that might be in-bound at the time of termination.void
Shutdown the event loop asynchronously with a grace period for work that might be in-bound at the time of termination.
-
Method Details
-
shutdown
void shutdown()Shutdown the event loop synchronously with a grace period for work that might be in-bound at the time of termination. This is not safe to call from inside the event loop as it blocks until the shutdown has completed. -
shutdownAsync
void shutdownAsync()Shutdown the event loop asynchronously with a grace period for work that might be in-bound at the time of termination. This is safe to call from inside the event loop where the standard blocking shutdown API is not. -
ioScheduler
Scheduler ioScheduler()- Returns:
- the single threaded IO work scheduler for this
IOContext
-
newTransport
Transport newTransport() -
create
Create an IOContext from the available options.- Parameters:
options
- TheTransportOptions
that configure the IO Transport the context creates.sslOptions
- TheSslOptions
that configure the SSL layer of the IO Transport the context creates.ioThreadName
- The name to given the single IO Thread the context must provide.- Returns:
- a new
IOContext
from available options.
-