public final class EventLoopGroup extends CrtResource
CrtResource.ResourceInstance
Constructor and Description |
---|
EventLoopGroup(int numThreads)
Creates a new event loop group for the I/O subsystem to use to run blocking I/O requests
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
CompletableFuture<Void> |
getShutdownCompleteFuture() |
protected void |
releaseNativeHandle()
Stops the event loop group's tasks and frees all resources associated with the the group.
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResources
public EventLoopGroup(int numThreads) throws CrtRuntimeException
numThreads
- The number of threads that the event loop group may run tasks across. Usually 1.CrtRuntimeException
- If the system is unable to allocate space for a native event loop groupprotected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately
in class CrtResource
protected void releaseNativeHandle()
releaseNativeHandle
in class CrtResource
public CompletableFuture<Void> getShutdownCompleteFuture()
Copyright © 2020. All rights reserved.