BUG-5280: remove support for talking to pre-Boron clients
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / RegisterChangeListener.java
1 /*
2  * Copyright (c) 2014 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
9 package org.opendaylight.controller.cluster.datastore.messages;
10
11 import akka.actor.ActorPath;
12 import akka.actor.ActorRef;
13 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15
16 public class RegisterChangeListener implements ListenerRegistrationMessage {
17     private final YangInstanceIdentifier path;
18     private final ActorRef dataChangeListener;
19     private final AsyncDataBroker.DataChangeScope scope;
20     private final boolean registerOnAllInstances;
21
22     public RegisterChangeListener(YangInstanceIdentifier path,
23         ActorRef dataChangeListener,
24         AsyncDataBroker.DataChangeScope scope, boolean registerOnAllInstances) {
25         this.path = path;
26         this.dataChangeListener = dataChangeListener;
27         this.scope = scope;
28         this.registerOnAllInstances = registerOnAllInstances;
29     }
30
31     @Override
32     public YangInstanceIdentifier getPath() {
33         return path;
34     }
35
36     public AsyncDataBroker.DataChangeScope getScope() {
37         return scope;
38     }
39
40     public ActorPath getDataChangeListenerPath() {
41         return dataChangeListener.path();
42     }
43
44     @Override
45     public boolean isRegisterOnAllInstances() {
46         return registerOnAllInstances;
47     }
48 }