+ return new SnapshotBackedReadTransaction<>(identifier, debug, snapshot, null);
+ }
+
+ /**
+ * Creates a new read-only transaction.
+ *
+ * @param identifier Transaction Identifier
+ * @param debug Enable transaction debugging
+ * @param snapshot Snapshot which will be modified.
+ * @param closeImpl Implementation of close method
+ * @return A new read-only transaction
+ */
+ public static <T> SnapshotBackedReadTransaction<T> newReadTransaction(final T identifier,
+ final boolean debug, final DataTreeSnapshot snapshot, final TransactionClosePrototype<T> closeImpl) {
+ return new SnapshotBackedReadTransaction<>(identifier, debug, snapshot, requireNonNull(closeImpl));