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
9 package org.opendaylight.controller.cluster.datastore.messages;
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;
16 public class RegisterChangeListener implements ListenerRegistrationMessage {
17 private final YangInstanceIdentifier path;
18 private final ActorRef dataChangeListenerActor;
19 private final AsyncDataBroker.DataChangeScope scope;
20 private final boolean registerOnAllInstances;
22 public RegisterChangeListener(YangInstanceIdentifier path, ActorRef dataChangeListenerActor,
23 AsyncDataBroker.DataChangeScope scope, boolean registerOnAllInstances) {
25 this.dataChangeListenerActor = dataChangeListenerActor;
27 this.registerOnAllInstances = registerOnAllInstances;
31 public YangInstanceIdentifier getPath() {
35 public AsyncDataBroker.DataChangeScope getScope() {
40 public ActorPath getListenerActorPath() {
41 return dataChangeListenerActor.path();
45 public boolean isRegisterOnAllInstances() {
46 return registerOnAllInstances;
50 public String toString() {
51 return "RegisterChangeListener [path=" + path + ", scope=" + scope + ", registerOnAllInstances="
52 + registerOnAllInstances + ", dataChangeListenerActor=" + dataChangeListenerActor + "]";