BUG-509: remove unnecessary Version objects
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / DataTreeSnapshot.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.dom.store.impl.tree;
9
10 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
12
13 import com.google.common.base.Optional;
14
15 /**
16  * Read-only snapshot of a {@link DataTree}. The snapshot is stable and isolated,
17  * e.g. data tree changes occurring after the snapshot has been taken are not
18  * visible through the snapshot.
19  */
20 public interface DataTreeSnapshot {
21     /**
22      * Read a particular node from the snapshot.
23      *
24      * @param path Path of the node
25      * @return Optional result encapsulating the presence and value of the node
26      */
27     Optional<NormalizedNode<?, ?>> readNode(InstanceIdentifier path);
28
29     /**
30      * Create a new data tree modification based on this snapshot, using the
31      * specified data application strategy.
32      *
33      * @param strategy data modification strategy
34      * @return A new data tree modification
35      */
36     DataTreeModification newModification();
37 }