JBoss Community Archive (Read Only)

XNIO

Workers

XNIO workers are the central point of coordination for a network application. A worker includes two different thread pool types:

I/O threads are used by XNIO for the purpose of notification but also may be used by the user to execute tasks or perform cancellable actions after an elapsed timeout; these are represented by the XnioExecutor interface. The worker thread pool exists for the user's use. Threads created by the worker are tagged with the worker name, to make them easier to identify in thread dumps and log files.

In addition to managing the thread pools and event callbacks, the worker is also the object from which most channels can be created; these include pipes and sockets of various types.

When a worker is no longer needed, it should be shut down using the shutdown method. When the worker's shutdown process is complete, the shutdown complete task (if any) which was registered upon creation of the worker is executed (typically from the last thread in the worker pool, before it is terminated).

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:59:27 UTC, last content change 2012-07-04 05:11:15 UTC.