2 * Copyright (c) 2015 Brocade Communications 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.cluster.datastore;
10 import akka.actor.ActorRef;
11 import org.checkerframework.checker.lock.qual.GuardedBy;
12 import org.opendaylight.controller.cluster.datastore.messages.RegisterDataTreeChangeListener;
13 import org.opendaylight.yangtools.concepts.Registration;
15 class DelayedDataTreeChangeListenerRegistration implements Registration {
16 private final RegisterDataTreeChangeListener registrationMessage;
17 private final ActorRef registrationActor;
20 private boolean closed;
22 DelayedDataTreeChangeListenerRegistration(final RegisterDataTreeChangeListener registrationMessage,
23 final ActorRef registrationActor) {
24 this.registrationMessage = registrationMessage;
25 this.registrationActor = registrationActor;
28 synchronized void doRegistration(final DataTreeChangeListenerSupport support) {
30 support.doRegistration(registrationMessage, registrationActor);
35 public synchronized void close() {