Package org.elasticsearch.nio
Interface NioGroup
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
NioSelectorGroup
public interface NioGroup extends java.io.CloseableAn class for interfacing with java.nio. Implementations implement the underlying logic for opening channels and registering them with the OS.
-
-
Method Summary
Modifier and Type Method Description <S extends NioServerSocketChannel>
SbindServerChannel(java.net.InetSocketAddress address, ChannelFactory<S,?> factory)Opens and binds a server channel to accept incoming connections.voidclose()<S extends NioSocketChannel>
SopenChannel(java.net.InetSocketAddress address, ChannelFactory<?,S> factory)Opens a outgoing client channel.
-
-
-
Method Detail
-
bindServerChannel
<S extends NioServerSocketChannel> S bindServerChannel(java.net.InetSocketAddress address, ChannelFactory<S,?> factory) throws java.io.IOException
Opens and binds a server channel to accept incoming connections.- Throws:
java.io.IOException
-
openChannel
<S extends NioSocketChannel> S openChannel(java.net.InetSocketAddress address, ChannelFactory<?,S> factory) throws java.io.IOException
Opens a outgoing client channel.- Throws:
java.io.IOException
-
close
void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-