public class ClientConnectionPool extends ClientMessageRouter
ClientMessageRouter
by aging out connections
over time and caching frequently-used connections. This modification is
well-suited for environments with high counts of outgoing connections.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<NetworkDestination,java.lang.Long> |
connectionAge |
destinationToSocket, logger, pendingRegistrations, socketToDestination, socketToTracker
changeInterest, DEFAULT_READ_BUFFER_SIZE, DEFAULT_WRITE_QUEUE_SIZE, online, PREFIX_SZ, READ_BUFFER_PROPERTY, readBufferSize, selector, WRITE_QUEUE_PROPERTY, writeQueueSize
Constructor and Description |
---|
ClientConnectionPool() |
Modifier and Type | Method and Description |
---|---|
Transmission |
sendMessage(NetworkDestination destination,
MendelMessage message)
Sends a message to the specified network destination.
|
broadcastMessage, disconnect, forceShutdown, run, sendMessage, shutdown
accept, addListener, connect, dispatchConnect, dispatchDisconnect, dispatchMessage, getClientString, getDestination, isOnline, processIncomingMessage, processSelectionKeys, read, readPrefix, sendMessage, updateInterestOps, wrapWithPrefix
protected java.util.Map<NetworkDestination,java.lang.Long> connectionAge
public ClientConnectionPool() throws java.io.IOException
java.io.IOException
public Transmission sendMessage(NetworkDestination destination, MendelMessage message) throws java.io.IOException
ClientMessageRouter
sendMessage
in class ClientMessageRouter
java.io.IOException