Bug-835:Reserve ports should be logical ports
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncDataChangeEvent.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.common.api.data;
9
10 import java.util.Map;
11 import java.util.Set;
12
13 import org.opendaylight.yangtools.concepts.Immutable;
14 import org.opendaylight.yangtools.concepts.Path;
15
16 public interface AsyncDataChangeEvent<P extends Path<P>,D> extends Immutable {
17     /**
18      * Returns a immutable map of paths and newly created objects
19      *
20      * @return map of paths and newly created objects
21      */
22     Map<P, D> getCreatedData();
23
24     /**
25      * Returns a immutable map of paths and respective updated objects after update.
26      *
27      * Original state of the object is in
28      * {@link #getOriginalData()}
29      *
30      * @return map of paths and newly created objects
31      */
32     Map<P, D> getUpdatedData();
33
34     /**
35      * Returns a immutable set of removed paths.
36      *
37      * Original state of the object is in
38      * {@link #getOriginalData()}
39      *
40      * @return set of removed paths
41      */
42     Set<P> getRemovedPaths();
43
44     /**
45      * Return a immutable map of paths and original state of updated and removed objects.
46      *
47      * This map is populated if at changed path was previous object, and captures
48      * state of previous object.
49      *
50      * @return map of paths and original state of updated and removed objects.
51      */
52     Map<P, ? extends D> getOriginalData();
53
54     /**
55      * Returns a  immutable stable view of data state, which
56      * captures state of data store before the reported change.
57      *
58      *
59      * The view is rooted at the point where the listener, to which the event is being delivered, was registered.
60      *
61      * @return Stable view of data before the change happened, rooted at the listener registration path.
62      *
63      */
64     D getOriginalSubtree();
65
66     /**
67      * Returns a immutable stable view of data, which captures state of data store
68      * after the reported change.
69      *
70      * The view is rooted at the point where the listener, to which the event is being delivered, was registered.
71      *
72      * @return Stable view of data after the change happened, rooted at the listener registration path.
73      */
74     D getUpdatedSubtree();
75 }