- void destroy(final long sequence, final RequestEnvelope envelope, final long now)
- throws RequestException {
- LOG.debug("{}: closing history {}", persistenceId(), getIdentifier());
- tree.closeTransactionChain(getIdentifier(), () -> {
- envelope.sendSuccess(new LocalHistorySuccess(getIdentifier(), sequence), readTime() - now);
- });
- }
-
- void purge(final long sequence, final RequestEnvelope envelope, final long now) {
- LOG.debug("{}: purging history {}", persistenceId(), getIdentifier());
- tree.purgeTransactionChain(getIdentifier(), () -> {
- envelope.sendSuccess(new LocalHistorySuccess(getIdentifier(), sequence), readTime() - now);
- });
- }
-
- private void checkDeadTransaction(final TransactionIdentifier id) throws RequestException {
- // FIXME: check if this history is still open
- // FIXME: check if the last transaction has been submitted
-
- // Transaction identifiers within a local history have to have increasing IDs
- if (lastSeenTransaction != null && Long.compareUnsigned(lastSeenTransaction, id.getTransactionId()) >= 0) {
- throw new DeadTransactionException(lastSeenTransaction);
- }
+ @Override
+ ShardDataTreeCohort createReadyCohort(final TransactionIdentifier id, final DataTreeModification mod,
+ final Optional<SortedSet<String>> participatingShardNames) {
+ return chain.createReadyCohort(id, mod, participatingShardNames);