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.impl.service;
10 import org.opendaylight.controller.md.sal.common.api.data.DataChangeListener;
11 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13 import org.opendaylight.yangtools.concepts.Path;
15 @SuppressWarnings("all")
16 class DataChangeListenerRegistration<P extends Path<P>, D extends Object, DCL extends DataChangeListener<P, D>> extends
17 AbstractObjectRegistration<DCL> implements ListenerRegistration<DCL> {
18 private AbstractDataBroker<P, D, DCL> dataBroker;
26 public DataChangeListenerRegistration(final P path, final DCL instance, final AbstractDataBroker<P, D, DCL> broker) {
28 this.dataBroker = broker;
33 protected void removeRegistration() {
34 this.dataBroker.removeListener(this);
35 this.dataBroker = null;