com.hazelcast.nio.tcp
Class TcpIpConnectionManager
java.lang.Object
com.hazelcast.nio.tcp.TcpIpConnectionManager
- All Implemented Interfaces:
- ConnectionManager
public class TcpIpConnectionManager
- extends Object
- implements ConnectionManager
TcpIpConnectionManager
public TcpIpConnectionManager(IOService ioService,
ServerSocketChannel serverSocketChannel)
interceptSocket
public void interceptSocket(Socket socket,
boolean onAccept)
throws IOException
- Throws:
IOException
isSocketInterceptorEnabled
public boolean isSocketInterceptorEnabled()
createPacketReader
public PacketReader createPacketReader(TcpIpConnection connection)
createPacketWriter
public PacketWriter createPacketWriter(TcpIpConnection connection)
getActiveConnectionCount
public int getActiveConnectionCount()
- Specified by:
getActiveConnectionCount
in interface ConnectionManager
getAllTextConnections
public int getAllTextConnections()
- Specified by:
getAllTextConnections
in interface ConnectionManager
getConnectionCount
public int getConnectionCount()
- Specified by:
getConnectionCount
in interface ConnectionManager
isSSLEnabled
public boolean isSSLEnabled()
incrementTextConnections
public void incrementTextConnections()
getPortableContext
public PortableContext getPortableContext()
getIOHandler
public IOService getIOHandler()
getSocketConnectTimeoutSeconds
public int getSocketConnectTimeoutSeconds()
addConnectionListener
public void addConnectionListener(ConnectionListener listener)
- Specified by:
addConnectionListener
in interface ConnectionManager
bind
public boolean bind(TcpIpConnection connection,
Address remoteEndPoint,
Address localEndpoint,
boolean reply)
registerConnection
public boolean registerConnection(Address remoteEndPoint,
Connection connection)
- Specified by:
registerConnection
in interface ConnectionManager
getConnection
public Connection getConnection(Address address)
- Specified by:
getConnection
in interface ConnectionManager
getOrConnect
public Connection getOrConnect(Address address)
- Specified by:
getOrConnect
in interface ConnectionManager
getOrConnect
public Connection getOrConnect(Address address,
boolean silent)
- Specified by:
getOrConnect
in interface ConnectionManager
destroyConnection
public void destroyConnection(Connection connection)
- Specified by:
destroyConnection
in interface ConnectionManager
initSocket
protected void initSocket(Socket socket)
throws Exception
- Throws:
Exception
start
public void start()
- Specified by:
start
in interface ConnectionManager
restart
public void restart()
- Specified by:
restart
in interface ConnectionManager
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ConnectionManager
getCurrentClientConnections
public int getCurrentClientConnections()
- Specified by:
getCurrentClientConnections
in interface ConnectionManager
isLive
public boolean isLive()
dumpPerformanceMetrics
public void dumpPerformanceMetrics(StringBuffer sb)
- Description copied from interface:
ConnectionManager
- Dumps all kinds of performance metrics. It is up to the implementation to add anything.
- Specified by:
dumpPerformanceMetrics
in interface ConnectionManager
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.