2 * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.md.sal.common.api.data;
13 import org.opendaylight.yangtools.concepts.Immutable;
14 import org.opendaylight.yangtools.concepts.Path;
16 public interface AsyncDataChangeEvent<P extends Path<P>,D> extends Immutable {
18 * Returns a immutable map of paths and newly created objects
20 * @return map of paths and newly created objects
22 Map<P, D> getCreatedData();
25 * Returns a immutable map of paths and respective updated objects after update.
27 * Original state of the object is in
28 * {@link #getOriginalData()}
30 * @return map of paths and newly created objects
32 Map<P, D> getUpdatedData();
35 * Returns a immutable set of removed paths.
37 * Original state of the object is in
38 * {@link #getOriginalData()}
40 * @return set of removed paths
42 Set<P> getRemovedPaths();
45 * Return a immutable map of paths and original state of updated and removed objects.
47 * This map is populated if at changed path was previous object, and captures
48 * state of previous object.
50 * @return map of paths and original state of updated and removed objects.
52 Map<P, ? extends D> getOriginalData();
55 * Returns a immutable stable view of data state, which
56 * captures state of data store before the reported change.
59 * The view is rooted at the point where the listener, to which the event is being delivered, was registered.
61 * @return Stable view of data before the change happened, rooted at the listener registration path.
64 D getOriginalSubtree();
67 * Returns a immutable stable view of data, which captures state of data store
68 * after the reported change.
70 * The view is rooted at the point where the listener, to which the event is being delivered, was registered.
72 * @return Stable view of data after the change happened, rooted at the listener registration path.
74 D getUpdatedSubtree();