Package org.km3net.clb.remote.stack
Class SRPSocketHandler
- java.lang.Object
-
- org.km3net.clb.remote.stack.SRPSocketHandler
-
public class SRPSocketHandler extends java.lang.Object
The SRPSocketHandler manages the asynchronous processing of an SRPSocket. the SRPSocketManager allows less threads to be used for processing then when each thread had its own thread. Depending on the system this could save a lot of processing and switching time. The each SRPSocketHandler has one selector thread which checks for each of the sockets it is managing whether or not there is data. If so, it will schedule that data to be processed. When an SRPSocket is created, it requests an SRPSocketHandler. If the each socket handler has its maximum number of sockets, a new SRPSocketHandler will be created. The ratio between SocketHandlers and sockets must be defined. Also the maximum number of threads per pool. All these settings may influence the performance of the server.
-
-
Constructor Summary
Constructors Constructor Description SRPSocketHandler(int threadPoolSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
check(SRPSocketHandler hdl)
static SRPSocketHandler
get()
int
socketCount()
void
terminate()
-
-
-
Method Detail
-
get
public static SRPSocketHandler get()
-
check
public static void check(SRPSocketHandler hdl)
-
socketCount
public int socketCount()
-
terminate
public void terminate()
-
-