Merge "Re-added config.version to config-module-archetype."
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / routing / RouteChange.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.controller.md.sal.common.api.routing;
9
10 import java.util.Map;
11 import java.util.Set;
12 /**
13  * Event representing change in RPC routing table.
14  *
15  *
16  * @param <C> Type, which is used to represent Routing context.
17  * @param <P> Type of data tree path, which is used to identify route.
18  */
19 public interface RouteChange<C,P> {
20
21     /**
22      *
23      * Returns a map of removed routes in associated routing contexts.
24      * <p>
25      * This map represents routes, which were withdrawn from broker local
26      * routing table and broker may need to forward RPC to other broker
27      * in order to process RPC request.
28      *
29      * @return Map of contexts and removed routes
30      */
31     Map<C,Set<P>> getRemovals();
32     /**
33     *
34     * Returns a map of announced routes in associated routing contexts.
35     *
36     * This map represents routes, which were announced by broker
37     * and are present in broker's local routing table. This routes
38     * are processed by implementations which are registered
39     * to originating broker.
40     *
41     * @return Map of contexts and announced routes
42     */
43     Map<C,Set<P>> getAnnouncements();
44 }