199d8ff7bd0e19cca1210e538e43b0cae199f320
[bgpcep.git] / bgp / topology-provider / src / main / java / org / opendaylight / bgpcep / bgp / topology / provider / LocRIBListener.java
1 /*
2  * Copyright (c) 2013 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.bgpcep.bgp.topology.provider;
9
10 import java.util.EventListener;
11
12 import org.opendaylight.controller.md.sal.common.api.data.DataChangeEvent;
13 import org.opendaylight.controller.md.sal.common.api.data.DataModification;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 public interface LocRIBListener extends EventListener {
18         /**
19          * @param trans Modification transaction. The implementation must explicitly commit
20          *              it if it wishes to have its modifications propagated. The transaction
21          *              is not shared with any other entity and will be cleaned up by the
22          *              caller if it is not committed before this method returns.
23          * @param event Data change event
24          * @param depth Subscription path depth.
25          * @throws Exception throw it if you must. If you can handle it, please do so.
26          */
27         public void onLocRIBChange(DataModification<InstanceIdentifier<?>, DataObject> trans,
28                         DataChangeEvent<InstanceIdentifier<?>, DataObject> event) throws Exception;
29 }