/** * Creates a new read-write transaction. * * @param identifier transaction Identifier * @param debug Enable transaction debugging * @param snapshot Snapshot which will be modified. * @param readyImpl Implementation of ready method. */ public static <T> SnapshotBackedReadWriteTransaction<T> newReadWriteTransaction(final T identifier, final boolean debug, final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) { return new SnapshotBackedReadWriteTransaction<T>(identifier, debug, snapshot, readyImpl); }
/** * Creates a new read-write transaction. * * @param identifier transaction Identifier * @param debug Enable transaction debugging * @param snapshot Snapshot which will be modified. * @param readyImpl Implementation of ready method. */ public static <T> SnapshotBackedReadWriteTransaction<T> newReadWriteTransaction(final T identifier, final boolean debug, final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) { return new SnapshotBackedReadWriteTransaction<>(identifier, debug, snapshot, readyImpl); }
protected DOMStoreReadWriteTransaction newReadWriteTransaction(T transactionId) { Entry<State, DataTreeSnapshot> entry; DOMStoreReadWriteTransaction ret; do { entry = getSnapshot(transactionId); ret = new SnapshotBackedReadWriteTransaction<>(transactionId, getDebugTransactions(), entry.getValue(), this); } while (!recordTransaction(entry.getKey(), ret)); return ret; }
protected DOMStoreReadWriteTransaction newReadWriteTransaction(T transactionId) { Entry<State, DataTreeSnapshot> entry; DOMStoreReadWriteTransaction ret; do { entry = getSnapshot(transactionId); ret = new SnapshotBackedReadWriteTransaction<T>(transactionId, getDebugTransactions(), entry.getValue(), this); } while (!recordTransaction(entry.getKey(), ret)); return ret; }