com.taosdata.jdbc.ws

## Class WSRetryableStmt

- java.lang.Object
- - com.taosdata.jdbc.WrapperImpl
  - - com.taosdata.jdbc.AbstractStatement
    - - com.taosdata.jdbc.ws.WSStatement
      - - com.taosdata.jdbc.ws.WSRetryableStmt

All Implemented Interfaces:
  AutoCloseable, Statement, Wrapper

Direct Known Subclasses:
  AbsWSPreparedStatement, WSRowPreparedStatement

    public class WSRetryableStmt
    extends WSStatement

### Field Summary

Fields
`protected AtomicInteger` `batchInsertedRowsInner`
`protected AtomicReference<SQLException>` `lastError`
`protected ConnectionParam` `param`
`protected StmtInfo` `stmtInfo`

### Fields inherited from class com.taosdata.jdbc.ws.WSStatement

`closed, database, resultSet, transport, zoneId`

### Fields inherited from class com.taosdata.jdbc.AbstractStatement

`affectedRows, batchedArgs, instanceId`

### Fields inherited from interface java.sql.Statement

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

### Constructor Summary

Constructors
Constructor and Description
`WSRetryableStmt(AbstractConnection connection, ConnectionParam param, String database, Transport transport, Long instanceId, StmtInfo stmtInfo, AtomicInteger batchInsertedRows)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `initStmt(int retryTimes)`
`ResultResp` `queryWithRetry(io.netty.buffer.ByteBuf rawBlock)`
`void` `releaseStmt()`
`void` `writeBlockWithRetry(io.netty.buffer.ByteBuf rawBlock)`
`void` `writeBlockWithRetrySync(io.netty.buffer.ByteBuf rawBlock)`

### Methods inherited from class com.taosdata.jdbc.ws.WSStatement

`checkBlobSupport, close, execute, execute, executeQuery, executeQuery, executeUpdate, executeUpdate, getConnection, getQueryTimeout, getQueryTimeoutInMs, getResultSet, getUpdateCount, isClosed, setQueryTimeout`

### Methods inherited from class com.taosdata.jdbc.AbstractStatement

`addBatch, cancel, clearBatch, clearWarnings, closeOnCompletion, execute, execute, execute, executeBatch, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getInstanceId, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable`

### Methods inherited from class com.taosdata.jdbc.WrapperImpl

`isWrapperFor, unwrap`

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

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

### Methods inherited from interface java.sql.Statement

`executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, setLargeMaxRows`

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

### Field Detail

#### param

    protected final ConnectionParam param

#### stmtInfo

    protected StmtInfo stmtInfo

#### lastError

    protected final AtomicReference<SQLException> lastError

#### batchInsertedRowsInner

    protected final AtomicInteger batchInsertedRowsInner

### Constructor Detail

#### WSRetryableStmt

    public WSRetryableStmt(AbstractConnection connection,
                           ConnectionParam param,
                           String database,
                           Transport transport,
                           Long instanceId,
                           StmtInfo stmtInfo,
                           AtomicInteger batchInsertedRows)

### Method Detail

#### initStmt

    public void initStmt(int retryTimes)
                  throws SQLException

Throws:
  `SQLException`

#### writeBlockWithRetry

    public void writeBlockWithRetry(io.netty.buffer.ByteBuf rawBlock)
                             throws SQLException

Throws:
  `SQLException`

#### writeBlockWithRetrySync

    public void writeBlockWithRetrySync(io.netty.buffer.ByteBuf rawBlock)
                                 throws SQLException

Throws:
  `SQLException`

#### queryWithRetry

    public ResultResp queryWithRetry(io.netty.buffer.ByteBuf rawBlock)
                              throws SQLException

Throws:
  `SQLException`

#### releaseStmt

    public void releaseStmt()
                     throws SQLException

Throws:
  `SQLException`