2 * Copyright (c) 2013 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
9 package org.opendaylight.controller.clustering.services_implementation.internal;
11 import org.opendaylight.controller.clustering.services.IGetUpdates;
12 import org.opendaylight.controller.clustering.services.ICacheUpdateAware;
14 public class GetUpdatesContainer<K,V> implements IGetUpdates<K,V> {
15 private ICacheUpdateAware<K,V> toBeUpdated;
16 private String containerName;
17 private String cacheName;
19 public GetUpdatesContainer(ICacheUpdateAware<K,V> i, String containerName,
22 this.containerName = containerName;
23 this.cacheName = cacheName;
26 public ICacheUpdateAware<K,V> whichListener() {
27 return this.toBeUpdated;
31 public void entryCreated(K key, String containerName, String cacheName,
33 if (this.toBeUpdated != null) {
34 this.toBeUpdated.entryCreated(key, cacheName, local);
39 public void entryUpdated(K key, V new_value, String containerName,
42 if (this.toBeUpdated != null) {
43 this.toBeUpdated.entryUpdated(key, new_value, cacheName, local);
48 public void entryDeleted(K key, String containerName, String cacheName,
50 if (this.toBeUpdated != null) {
51 this.toBeUpdated.entryDeleted(key, cacheName, local);