org.apache.ignite.internal.jdbc.thin

## 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 and Description
`JdbcThinTcpIo(ConnectionProperties connProps, InetSocketAddress sockAddr, BinaryContext ctx, int timeout)` Start connection and perform handshake.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Close the client IO.
`boolean` `connected()`
`ConnectionProperties` `connectionProperties()`
`UUID` `nodeId()`
`InetSocketAddress` `socketAddress()`
`int` `timeout()` Returns socket timeout.
`void` `timeout(int ms)` Enable/disable socket timeout with specified timeout.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 SQLException

Enable/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 SQLException

Returns 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.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023