2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.dom.spi.store;
10 import com.google.common.annotations.Beta;
11 import java.util.Optional;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot;
16 * Interface implemented by {@link DOMStoreTransaction}s which are backed by a {@link DataTreeSnapshot}.
18 * @author Robert Varga
22 public interface SnapshotBackedTransaction extends DOMStoreTransaction {
24 * Returns the {@link DataTreeSnapshot} underlying this transaction. If this transaction is no longer open,
25 * {@link Optional#empty()} is returned.
27 * @return DataTreeSnapshot attached to this transaction if this transaction is still open.
29 Optional<DataTreeSnapshot> getSnapshot();