com.hazelcast.nio.tcp
Class TcpIpConnectionManager

java.lang.Object
  extended by com.hazelcast.nio.tcp.TcpIpConnectionManager
All Implemented Interfaces:
ConnectionManager

public class TcpIpConnectionManager
extends Object
implements ConnectionManager


Constructor Summary
TcpIpConnectionManager(IOService ioService, ServerSocketChannel serverSocketChannel)
           
 
Method Summary
 void addConnectionListener(ConnectionListener listener)
           
 boolean bind(TcpIpConnection connection, Address remoteEndPoint, Address localEndpoint, boolean reply)
           
 PacketReader createPacketReader(TcpIpConnection connection)
           
 PacketWriter createPacketWriter(TcpIpConnection connection)
           
 void destroyConnection(Connection connection)
           
 void dumpPerformanceMetrics(StringBuffer sb)
          Dumps all kinds of performance metrics.
 int getActiveConnectionCount()
           
 int getAllTextConnections()
           
 Connection getConnection(Address address)
           
 int getConnectionCount()
           
 int getCurrentClientConnections()
           
 IOService getIOHandler()
           
 Connection getOrConnect(Address address)
           
 Connection getOrConnect(Address address, boolean silent)
           
 PortableContext getPortableContext()
           
 int getSocketConnectTimeoutSeconds()
           
 void incrementTextConnections()
           
protected  void initSocket(Socket socket)
           
 void interceptSocket(Socket socket, boolean onAccept)
           
 boolean isLive()
           
 boolean isSocketInterceptorEnabled()
           
 boolean isSSLEnabled()
           
 boolean registerConnection(Address remoteEndPoint, Connection connection)
           
 void restart()
           
 void shutdown()
           
 void start()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TcpIpConnectionManager

public TcpIpConnectionManager(IOService ioService,
                              ServerSocketChannel serverSocketChannel)
Method Detail

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.