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;
10 import org.opendaylight.yangtools.concepts.ListenerRegistration;
11 import org.opendaylight.yangtools.concepts.Path;
13 public interface AsyncDataBroker<P extends Path<P>, D, L extends AsyncDataChangeListener<P, D>> extends //
14 AsyncDataTransactionFactory<P, D> {
18 * Scope of Data Change
20 * Represents scope of data change (addition, replacement, deletion).
22 * The terminology for types is reused from LDAP
24 * @see http://www.idevelopment.info/data/LDAP/LDAP_Resources/SEARCH_Setting_the_SCOPE_Parameter.shtml
26 public enum DataChangeScope {
29 * Represents only a direct change of the node, such as replacement of node,
30 * addition or deletion.
35 * Represent a change (addition,replacement,deletion)
36 * of the node or one of it's direct childs.
41 * Represents a change of the node or any of it's child nodes.
48 public AsyncReadTransaction<P, D> newReadOnlyTransaction();
51 public AsyncReadWriteTransaction<P,D> newReadWriteTransaction();
54 public AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
57 * Registers {@link DataChangeListener} for Data Change callbacks
58 * which will be triggered on which will be triggered on the store
60 * @param store Logical store in which listener is registered.
61 * @param path Path (subtree identifier) on which client listener will be invoked.
62 * @param listener Instance of listener which should be invoked on
63 * @param triggeringScope Scope of change which triggers callback.
64 * @return Listener registration of the listener, call {@link ListenerRegistration#close()}
65 * to stop delivery of change events.
67 ListenerRegistration<L> registerDataChangeListener(LogicalDatastoreType store, P path, L listener, DataChangeScope triggeringScope);