BUG-4084: Li:Save flows in operational based on barrier success
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / registry / ItemLifeCycleRegistry.java
1 /*
2  * Copyright (c) 2015 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.openflowplugin.api.openflow.registry;
10
11 import org.opendaylight.openflowplugin.api.openflow.rpc.ItemLifeCycleSource;
12 import org.opendaylight.yangtools.concepts.Registration;
13
14 /**
15  * Registration point for any kind of lifecycle sources per device.
16  */
17 public interface ItemLifeCycleRegistry {
18
19     /**
20      * register given life cycle source to known sources of device
21      *
22      * @param lifeCycleSource life cycle changes provider
23      * @return closeable registration
24      */
25     Registration registerLifeCycleSource(ItemLifeCycleSource lifeCycleSource);
26
27     /**
28      * close all existing registrations
29      */
30     void clear();
31
32     /**
33      * @return registered sources
34      */
35     Iterable<ItemLifeCycleSource> getLifeCycleSources();
36 }