Merge "Move adsal into its own subdirectory."
[controller.git] / opendaylight / adsal / clustering / services / src / main / java / org / opendaylight / controller / clustering / services / IGetUpdates.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 /**
11  * @file   IGetUpdates.java
12  *
13  * @brief  Interface that needs to be implemented by the listeners of
14  * updates received on data structure shared in the cluster
15  *
16  * Interface that needs to be implemented by the listeners of updates
17  * received on data structure shared in the cluster
18  */
19 package org.opendaylight.controller.clustering.services;
20
21 /**
22  * @deprecated for internal use
23  * Interface that needs to be implemented by the listeners of
24  * updates received on data structure shared in the cluster
25  */
26 public interface IGetUpdates<K, V> {
27     /**
28      * Invoked when a new entry is available in the cache, the key is
29      * only provided, the value will come as an entryUpdate invocation
30      *
31      * @param key Key for the entry just created
32      * @param containerName container for which the update has been received
33      * @param cacheName name of the cache for which update has been received
34      */
35     void entryCreated(K key, String containerName, String cacheName,
36             boolean local);
37
38     /**
39      * Called anytime a given entry is updated
40      *
41      * @param key Key for the entry modified
42      * @param new_value the new value the key will have
43      * @param containerName container for which the update has been received
44      * @param cacheName name of the cache for which update has been received
45      */
46     void entryUpdated(K key, V new_value, String containerName,
47             String cacheName, boolean local);
48
49     /**
50      * Called anytime a given key is removed from the
51      * ConcurrentHashMap we are listening to.
52      *
53      * @param key Key of the entry removed
54      * @param containerName container for which the update has been received
55      * @param cacheName name of the cache for which update has been received
56      */
57     void entryDeleted(K key, String containerName, String cacheName,
58             boolean originLocal);
59 }