package org.opendaylight.controller.sal.core.spi.data;
import static com.google.common.base.Preconditions.checkState;
+import static java.util.Objects.requireNonNull;
import com.google.common.annotations.Beta;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import org.eclipse.jdt.annotation.Nullable;
* {@link org.opendaylight.controller.sal.core.spi.data.SnapshotBackedWriteTransaction.TransactionReadyPrototype}.
*
* @param <T> Identifier type
+ * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction} instead.
*/
+@Deprecated
@Beta
public class SnapshotBackedWriteTransaction<T> extends AbstractDOMStoreTransaction<T>
implements DOMStoreWriteTransaction {
SnapshotBackedWriteTransaction(final T identifier, final boolean debug,
final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) {
super(identifier, debug);
- this.readyImpl = Preconditions.checkNotNull(readyImpl, "readyImpl must not be null.");
+ this.readyImpl = requireNonNull(readyImpl, "readyImpl must not be null.");
mutableTree = snapshot.newModification();
LOG.debug("Write Tx: {} allocated with snapshot {}", identifier, snapshot);
}
*
* @param <T> identifier type
*/
+ @Deprecated
public abstract static class TransactionReadyPrototype<T> {
/**
* Called when a transaction is closed without being readied. This is not invoked for