@Override public MemoryState getState() { return (MemoryState) super.getState(); }
/** * DiffFeatureWriter construction. * * @param reader * @param diff * @param filter */ public DiffContentFeatureWriter( ContentFeatureStore store, Diff diff, FeatureReader<SimpleFeatureType, SimpleFeature> reader, SimpleFeatureBuilder builder) { this.store = store; this.reader = reader; this.state = store.getState(); this.diff = diff; this.builder = builder; }
@Override public void rollback() throws IOException { store.getState().fireBatchFeatureEvent(false); }
@Override public void commit() throws IOException { store.getState().fireBatchFeatureEvent(true); }
/** * 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()); } }
/** * DiffFeatureWriter construction. * * @param reader * @param diff * @param filter */ public DiffContentFeatureWriter(ContentFeatureStore store, Diff diff, FeatureReader<SimpleFeatureType, SimpleFeature> reader) { this.store = store; this.reader = reader; this.state = store.getState(); this.diff = diff; }
@Override public void commit() throws IOException { store.getState().fireBatchFeatureEvent(true); } @Override
@Override public void rollback() throws IOException { store.getState().fireBatchFeatureEvent(false); } @Override
/** * 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()); } }