+ static LocalFrontendHistory create(final String persistenceId, final ShardDataTree tree,
+ final LocalHistoryIdentifier historyId) {
+ return new LocalFrontendHistory(persistenceId, tree, tree.ensureTransactionChain(historyId), ImmutableMap.of(),
+ TreeRangeSet.create());
+ }
+
+ static LocalFrontendHistory recreate(final String persistenceId, final ShardDataTree tree,
+ final ShardDataTreeTransactionChain chain, final Map<UnsignedLong, Boolean> closedTransactions,
+ final RangeSet<UnsignedLong> purgedTransactions) {
+ return new LocalFrontendHistory(persistenceId, tree, chain, new HashMap<>(closedTransactions),
+ TreeRangeSet.create(purgedTransactions));
+ }
+