Package org.apache.iotdb.session.pool
Class SessionDataSetWrapper
- java.lang.Object
-
- org.apache.iotdb.session.pool.SessionDataSetWrapper
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class SessionDataSetWrapper extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description SessionDataSetWrapper(SessionDataSet sessionDataSet, Session session, SessionPool pool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()close this dataset to release the sessionintgetBatchSize()java.util.List<java.lang.String>getColumnNames()java.util.List<java.lang.String>getColumnTypes()protected SessiongetSession()booleanhasNext()If there is an Exception, and you do not want to use the resultset anymore, you have to release the resultset manually by calling closeResultSetSessionDataSet.DataIteratoriterator()retrieve data set like jdbcorg.apache.iotdb.tsfile.read.common.RowRecordnext()If there is an Exception, and you do not want to use the resultset anymore, you have to release the resultset manually by calling closeResultSetvoidsetBatchSize(int batchSize)
-
-
-
Constructor Detail
-
SessionDataSetWrapper
public SessionDataSetWrapper(SessionDataSet sessionDataSet, Session session, SessionPool pool)
-
-
Method Detail
-
getSession
protected Session getSession()
-
getBatchSize
public int getBatchSize()
-
setBatchSize
public void setBatchSize(int batchSize)
-
hasNext
public boolean hasNext() throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionIf there is an Exception, and you do not want to use the resultset anymore, you have to release the resultset manually by calling closeResultSet- Returns:
- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
next
public org.apache.iotdb.tsfile.read.common.RowRecord next() throws org.apache.iotdb.rpc.IoTDBConnectionException, org.apache.iotdb.rpc.StatementExecutionExceptionIf there is an Exception, and you do not want to use the resultset anymore, you have to release the resultset manually by calling closeResultSet- Returns:
- Throws:
org.apache.iotdb.rpc.IoTDBConnectionExceptionorg.apache.iotdb.rpc.StatementExecutionException
-
iterator
public SessionDataSet.DataIterator iterator()
retrieve data set like jdbc
-
getColumnNames
public java.util.List<java.lang.String> getColumnNames()
-
getColumnTypes
public java.util.List<java.lang.String> getColumnTypes()
-
close
public void close()
close this dataset to release the session- Specified by:
closein interfacejava.lang.AutoCloseable
-
-