@Test public void testStoreTwoExactSameSnapshots() { testSubject.storeSnapshot(createEvent(1)); testSubject.storeSnapshot(createEvent(1)); }
@Override protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) { transactionManager.executeInTransaction(() -> { try { executeUpdates( getConnection(), e -> handlePersistenceException(e, snapshot), connection -> appendSnapshot(connection, snapshot, serializer), connection -> deleteSnapshots(connection, snapshot.getAggregateIdentifier(), snapshot.getSequenceNumber()) ); } catch (ConcurrencyException e) { } }); }
JdbcEventStorageEngine extends BatchingEventStorageEngine { @Override protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) { transactionManager.executeInTransaction(() -> { try { executeUpdates( getConnection(), e -> handlePersistenceException(e, snapshot), connection -> appendSnapshot(connection, snapshot, serializer), connection -> deleteSnapshots(connection, snapshot.getAggregateIdentifier(), snapshot.getSequenceNumber()) ); } catch (ConcurrencyException e) { } }); } }
JdbcEventStorageEngine extends BatchingEventStorageEngine { @Override protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) { transactionManager.executeInTransaction(() -> { try { executeUpdates( getConnection(), e -> handlePersistenceException(e, snapshot), connection -> appendSnapshot(connection, snapshot, serializer), connection -> deleteSnapshots(connection, snapshot.getAggregateIdentifier(), snapshot.getSequenceNumber()) ); } catch (ConcurrencyException e) { } }); } protected  JdbcEventStorageEngine(Builder builder); }
JdbcEventStorageEngine extends BatchingEventStorageEngine { @Override protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) { transactionManager.executeInTransaction(() -> { try { executeUpdates( getConnection(), e -> handlePersistenceException(e, snapshot), connection -> appendSnapshot(connection, snapshot, serializer), connection -> deleteSnapshots(connection, snapshot.getAggregateIdentifier(), snapshot.getSequenceNumber()) ); } catch (ConcurrencyException e) { } }); } protected  JdbcEventStorageEngine(Builder builder); static Builder builder(); void createSchema(EventTableFactory schemaFactory); @Override Optional<Long> lastSequenceNumberFor(String aggregateIdentifier); @Override TrackingToken createTailToken(); @Override TrackingToken createHeadToken(); @Override TrackingToken createTokenAt(Instant dateTime); @Deprecated void setGapTimeout(int gapTimeout); @Deprecated void setGapCleaningThreshold(int gapCleaningThreshold); }
JdbcEventStorageEngine extends BatchingEventStorageEngine { @Override protected void storeSnapshot(DomainEventMessage<?> snapshot, Serializer serializer) { transactionManager.executeInTransaction(() -> { try { executeUpdates( getConnection(), e -> handlePersistenceException(e, snapshot), connection -> appendSnapshot(connection, snapshot, serializer), connection -> deleteSnapshots(connection, snapshot.getAggregateIdentifier(), snapshot.getSequenceNumber()) ); } catch (ConcurrencyException e) { } }); } protected  JdbcEventStorageEngine(Builder builder); static Builder builder(); void createSchema(EventTableFactory schemaFactory); @Override Optional<Long> lastSequenceNumberFor(String aggregateIdentifier); @Override TrackingToken createTailToken(); @Override TrackingToken createHeadToken(); @Override TrackingToken createTokenAt(Instant dateTime); @Deprecated void setGapTimeout(int gapTimeout); @Deprecated void setGapCleaningThreshold(int gapCleaningThreshold);  }