Fix followerDistributedDataStore tear down
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / main / java / org / opendaylight / controller / cluster / ActorSystemProvider.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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 package org.opendaylight.controller.cluster;
9
10 import akka.actor.ActorSystem;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13
14 /**
15  * Interface that provides an akka ActorSystem instance.
16  *
17  * @author Thomas Pantelis
18  */
19 public interface ActorSystemProvider {
20
21     /**
22      * Returns the ActorSystem.
23      *
24      * @return the ActorSystem.
25      */
26     @NonNull ActorSystem getActorSystem();
27
28     /**
29      * Register a listener for ActorSystem lifecycle events.
30      *
31      * @param listener the ActorSystemProviderListener to register
32      * @return a ListenerRegistration instance to be used to unregister
33      */
34     ListenerRegistration<ActorSystemProviderListener> registerActorSystemProviderListener(
35             @NonNull ActorSystemProviderListener listener);
36 }