Package com.nt.udc.oi.node.jdbc
Class DBBatchInserter
java.lang.Object
com.nt.udc.oi.node.jdbc.DBInserter
com.nt.udc.oi.node.jdbc.DBBatchInserter
- All Implemented Interfaces:
DBUpdaterIfc
-
Field Summary
FieldsFields inherited from class com.nt.udc.oi.node.jdbc.DBInserter
badRecCount, badRecDir, badRecFile, badRecNarFile, dbConn, errMesg, fos, healthy, inserts, invalidRecCount, lobData, logger, MAX_BAD_RECORDS_PER_FILE, RECORD_SEPARATOR, reservedColumnList, reservedNamesList, reservedTableList, tableColumns, writer
-
Constructor Summary
ConstructorsConstructorDescriptionDBBatchInserter
(Connection dbConn, String dbUser, Hashtable tableColumns, Hashtable lobData, List<List<String>> reservedNamesList, LoggerIfc logger, JDBCOITransport transport, int batchTimeOut, int batchTimeOutCount) -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleTimeoutException
(Exception toe, JDBCOIRecord[] batch) boolean
void
updateDB
(JDBCOIRecord[] records) This method takes the set of records for all tables that need to be inserted the set of records is then split into different batches one for each table and executed sequentially if there is any case of parent child relationship in the records then the parent records should placed before the child records in the NPL, this method will not do any validation on the parent child relationshipMethods inherited from class com.nt.udc.oi.node.jdbc.DBInserter
buildStatements, checkColumn, resetConnection, setColumnValue, shutdown, writeBadRecord, writeBadRecordNar
-
Field Details
-
transport
-
dbSingInserter
-
-
Constructor Details
-
DBBatchInserter
public DBBatchInserter(Connection dbConn, String dbUser, Hashtable tableColumns, Hashtable lobData, List<List<String>> reservedNamesList, LoggerIfc logger, JDBCOITransport transport, int batchTimeOut, int batchTimeOutCount)
-
-
Method Details
-
updateDB
This method takes the set of records for all tables that need to be inserted the set of records is then split into different batches one for each table and executed sequentially if there is any case of parent child relationship in the records then the parent records should placed before the child records in the NPL, this method will not do any validation on the parent child relationship- Specified by:
updateDB
in interfaceDBUpdaterIfc
- Specified by:
updateDB
in classDBInserter
-
isHealthy
public boolean isHealthy()- Specified by:
isHealthy
in interfaceDBUpdaterIfc
- Specified by:
isHealthy
in classDBInserter
-
handleTimeoutException
public void handleTimeoutException(Exception toe, JDBCOIRecord[] batch) throws LostConnectionException - Throws:
LostConnectionException
-