/** * Clean up resources associated with this writer. * * <p>Diff is not clear()ed as it is assumed that it belongs to a Transaction.State object and * may yet be written out. * * @see org.geotools.data.FeatureWriter#close() */ public void close() throws IOException { Transaction t = state.getTransaction(); if (t != Transaction.AUTO_COMMIT) { t.removeState(this); } if (writer != null) { writer.close(); writer = null; } feature = null; } /**
/** * EventContentFeatureWriter construction. * * @param reader * @param diff * @param filter */ public EventContentFeatureWriter( ContentFeatureStore store, FeatureWriter<SimpleFeatureType, SimpleFeature> writer) { this.store = store; this.writer = writer; this.state = store.getState(); Transaction t = state.getTransaction(); if (t != Transaction.AUTO_COMMIT) { // auto commit does not issue batch events t.putState(this, new EventContentTransactionState()); } }
assertSame(state.getTransaction(), transaction);
/** * Clean up resources associated with this writer. * * <p> * Diff is not clear()ed as it is assumed that it belongs to a Transaction.State object and may yet be written out. * </p> * * @see org.geotools.data.FeatureWriter#close() */ public void close() throws IOException { Transaction t = state.getTransaction(); if (t != Transaction.AUTO_COMMIT ){ t.removeState(this); } if( writer != null ){ writer.close(); writer = null; } feature = null; } /**
/** * EventContentFeatureWriter construction. * * @param reader * @param diff * @param filter */ public EventContentFeatureWriter(ContentFeatureStore store, FeatureWriter<SimpleFeatureType, SimpleFeature> writer) { this.store = store; this.writer = writer; this.state = store.getState(); Transaction t = state.getTransaction(); if( t != Transaction.AUTO_COMMIT ){ // auto commit does not issue batch events t.putState(this,new EventContentTransactionState()); } }