X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fspi%2Fdata%2FSnapshotBackedTransactions.java;fp=opendaylight%2Fmd-sal%2Fsal-dom-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fspi%2Fdata%2FSnapshotBackedTransactions.java;h=0000000000000000000000000000000000000000;hb=2611e6a728e586ea34dd891f30a473bf54d6cbd8;hp=86edbfffc8be8f17b06917d490542c72c4ef1563;hpb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/SnapshotBackedTransactions.java b/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/SnapshotBackedTransactions.java deleted file mode 100644 index 86edbfffc8..0000000000 --- a/opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/SnapshotBackedTransactions.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.sal.core.spi.data; - -import static java.util.Objects.requireNonNull; - -import com.google.common.annotations.Beta; -import org.opendaylight.controller.sal.core.spi.data.SnapshotBackedReadTransaction.TransactionClosePrototype; -import org.opendaylight.controller.sal.core.spi.data.SnapshotBackedWriteTransaction.TransactionReadyPrototype; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; - -/** - * Public utility class for instantiating snapshot-backed transactions. - * - * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.store.SnapshotBackedTransactions} instead. - */ -@Deprecated(forRemoval = true) -@Beta -public final class SnapshotBackedTransactions { - private SnapshotBackedTransactions() { - throw new UnsupportedOperationException("Utility class"); - } - - /** - * Creates a new read-only transaction. - * - * @param identifier Transaction Identifier - * @param debug Enable transaction debugging - * @param snapshot Snapshot which will be modified. - * @return A new read-only transaction - */ - public static SnapshotBackedReadTransaction newReadTransaction(final T identifier, final boolean debug, - final DataTreeSnapshot snapshot) { - 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 SnapshotBackedReadTransaction newReadTransaction(final T identifier, - final boolean debug, final DataTreeSnapshot snapshot, final TransactionClosePrototype closeImpl) { - return new SnapshotBackedReadTransaction<>(identifier, debug, snapshot, requireNonNull(closeImpl)); - } - - /** - * 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. - * @return A new read-write transaction - */ - public static SnapshotBackedReadWriteTransaction newReadWriteTransaction(final T identifier, - final boolean debug, final DataTreeSnapshot snapshot, final TransactionReadyPrototype readyImpl) { - return new SnapshotBackedReadWriteTransaction<>(identifier, debug, snapshot, readyImpl); - } - - /** - * Creates a new write-only transaction. - * - * @param identifier transaction Identifier - * @param debug Enable transaction debugging - * @param snapshot Snapshot which will be modified. - * @param readyImpl Implementation of ready method. - * @return A new write transaction - */ - public static SnapshotBackedWriteTransaction newWriteTransaction(final T identifier, final boolean debug, - final DataTreeSnapshot snapshot, final TransactionReadyPrototype readyImpl) { - return new SnapshotBackedWriteTransaction<>(identifier, debug, snapshot, readyImpl); - } -}