What does OIO mean in java?

时间:2016-02-03 02:50:24

标签: java io netty nio terminology

Forgive me I just began to learn Java network programming. I just read Netty in Action which mentions a OIO.

NIO is used in this example because it’s currently the most widely used transport, thanks to its scalability and thoroughgoing asynchrony. But a different transport implementation could be used as well. If you wished to use the OIO transport in your server, you’d specify OioServerSocketChannel and OioEventLoopGroup.

I knew the Java IO and NIO already before. But what is the OIO?

I tried to search it in the google but got nothing. Could anyone please help explain what it is?

1 个答案:

答案 0 :(得分:7)

OIO stands for Old IO or Blocking IO. In this model each socket or client connection results in spawning a new dedicated thread to handle the request. So, Number or threads == Number of clients/sockets active.

With NIO or New IO, it is possible to have fewer threads serve more number of clients. Here, Number or threads < Number of clients/sockets active.