Package org.apache.hadoop.oncrpc
Class SimpleTcpServer
java.lang.Object
org.apache.hadoop.oncrpc.SimpleTcpServer
Simple UDP server implemented using netty.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intstatic final org.slf4j.Loggerprotected final intprotected final io.netty.channel.ChannelInboundHandlerAdapterprotected final intThe maximum number of I/O worker threads -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
port
protected final int port -
boundPort
protected int boundPort -
rpcProgram
protected final io.netty.channel.ChannelInboundHandlerAdapter rpcProgram -
workerCount
protected final int workerCountThe maximum number of I/O worker threads
-
-
Constructor Details
-
SimpleTcpServer
- Parameters:
port- TCP port where to start the server atprogram- RPC program corresponding to the serverworkercount- Number of worker threads
-
-
Method Details
-
run
- Throws:
InterruptedException
-
getBoundPort
public int getBoundPort() -
shutdown
public void shutdown()
-