XNIO Concepts: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
An XNIO worker is the central point of coordination for a network application. It manages several kind of threads, and the threads created by the worker are tagged with the worker name. A worker has two different types of thread pools: | An XNIO worker is the central point of coordination for a network application. It manages several kind of threads, and the threads created by the worker are tagged with the worker name. A worker has two different types of thread pools: | ||
==I/O | ==I/O Thread== | ||
The I/O threads come in two types: | The I/O threads come in two types: | ||
Line 25: | Line 25: | ||
* '''Write threads''' that can handle callback for write events. | * '''Write threads''' that can handle callback for write events. | ||
==Worker | ==Worker Thread== | ||
The worker threads are managed by a standard Executor-based thread pool. | The worker threads are managed by a standard Executor-based thread pool. | ||
=Channel= | |||
XNIO provides a channel abstraction that hides the underlying transport. Channels are notified of events using the <tt>ChannelListener</tt> API. Upon creation, channels are assigned an [[IO Thread]] | |||
=XNIO Listener= | =XNIO Listener= |
Revision as of 02:46, 19 January 2016
Internal
Overview
XNIO is a simplified low-level I/O layer, built in top of Java NIO. It has an API for combining blocking and non-blocking operations, even on the same channel.
NIO Concepts
XNIO Worker
- https://docs.jboss.org/author/display/XNIO/Workers
- http://docs.jboss.org/xnio/3.1/api/index.html?org/xnio/XnioWorker.html
An XNIO worker is the central point of coordination for a network application. It manages several kind of threads, and the threads created by the worker are tagged with the worker name. A worker has two different types of thread pools:
I/O Thread
The I/O threads come in two types:
- Read threads that can handle callbacks for read events.
- Write threads that can handle callback for write events.
Worker Thread
The worker threads are managed by a standard Executor-based thread pool.
Channel
XNIO provides a channel abstraction that hides the underlying transport. Channels are notified of events using the ChannelListener API. Upon creation, channels are assigned an IO Thread