- StandaloneFrontendHistory(final String persistenceId, final ClientIdentifier clientId, final ShardDataTree tree) {
- super(persistenceId);
- this.identifier = new LocalHistoryIdentifier(clientId, 0);
- this.tree = Preconditions.checkNotNull(tree);
+ static @NonNull StandaloneFrontendHistory create(final String persistenceId, final ClientIdentifier clientId,
+ final ShardDataTree tree) {
+ return new StandaloneFrontendHistory(persistenceId, clientId, tree, ImmutableMap.of(),
+ MutableUnsignedLongSet.of());
+ }
+
+ static @NonNull StandaloneFrontendHistory recreate(final String persistenceId, final ClientIdentifier clientId,
+ final ShardDataTree tree, final Map<UnsignedLong, Boolean> closedTransactions,
+ final MutableUnsignedLongSet purgedTransactions) {
+ return new StandaloneFrontendHistory(persistenceId, clientId, tree, new HashMap<>(closedTransactions),
+ purgedTransactions.mutableCopy());