コード例 #1
0
 public JdbcWriterImpl(final JdbcRecordStore recordStore, final CategoryLabelCountMap statistics) {
   this.recordStore = recordStore;
   this.statistics = statistics;
   this.connection = recordStore.getJdbcConnection();
   final DataSource dataSource = this.connection.getDataSource();
   if (dataSource != null) {
     try {
       this.connection.setAutoCommit(false);
     } catch (final SQLException e) {
       throw new RuntimeException("Unable to create connection", e);
     }
   }
   statistics.connect();
 }
コード例 #2
0
 public JdbcWriterImpl(final JdbcRecordStore recordStore) {
   this(recordStore, recordStore.getStatistics());
 }