Class JdbcThinTcpIo
- java.lang.Object
-
- org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo
-
public class JdbcThinTcpIo extends Object
JDBC IO layer implementation based on blocking IPC streams.
-
-
Constructor Summary
Constructors Constructor Description JdbcThinTcpIo(ConnectionProperties connProps, InetSocketAddress sockAddr, BinaryContext ctx, int timeout)Start connection and perform handshake.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the client IO.booleanconnected()ConnectionPropertiesconnectionProperties()UUIDnodeId()InetSocketAddresssocketAddress()inttimeout()Returns socket timeout.voidtimeout(int ms)Enable/disable socket timeout with specified timeout.
-
-
-
Constructor Detail
-
JdbcThinTcpIo
public JdbcThinTcpIo(ConnectionProperties connProps, InetSocketAddress sockAddr, BinaryContext ctx, int timeout) throws SQLException, IOException
Start connection and perform handshake.- Parameters:
connProps- Connection properties.sockAddr- Socket address.ctx- Binary context for proper serialization/deserialization of binary objects.timeout- Socket connection timeout in ms.- Throws:
SQLException- On connection error or reject.IOException- On IO error in handshake.
-
-
Method Detail
-
close
public void close()
Close the client IO.
-
connectionProperties
public ConnectionProperties connectionProperties()
- Returns:
- Connection properties.
-
timeout
public void timeout(int ms) throws SQLExceptionEnable/disable socket timeout with specified timeout.- Parameters:
ms- the specified timeout, in milliseconds.- Throws:
SQLException- if there is an error in the underlying protocol.
-
timeout
public int timeout() throws SQLExceptionReturns socket timeout.- Throws:
SQLException- if there is an error in the underlying protocol.
-
nodeId
public UUID nodeId()
- Returns:
- Node Id.
-
socketAddress
public InetSocketAddress socketAddress()
- Returns:
- Socket address.
-
connected
public boolean connected()
- Returns:
- Connected flag.
-
-