Bug 1029: Remove dead code: samples/clustersession
[controller.git] / opendaylight / configuration / api / src / main / java / org / opendaylight / controller / configuration / IConfigurationServiceCommon.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.configuration;
11
12 import java.util.List;
13
14 import org.opendaylight.controller.sal.utils.IObjectReader;
15 import org.opendaylight.controller.sal.utils.Status;
16
17 /**
18  * Common configuration interface for Configuration Service and Container
19  * Configuration Service
20  */
21 public interface IConfigurationServiceCommon {
22     /**
23      * Represent the trigger to save the controller configuration cluster wide.
24      * When called on IConfigurationService, it will trigger a cluster wide save
25      * configuration event for all the global instance components and all
26      * components in all containers. When called on
27      * IContainerConfigurationService, it will trigger a cluster wide save
28      * configuration event for all components in the current container.
29      *
30      * @return the Status object representing the result of the saving request
31      */
32     Status saveConfigurations();
33
34     /**
35      * Bundle will call this function to ask Configuration Manager to persist
36      * their configurations. It is up to the Configuration Manager to decide
37      * how the configuration will be persisted
38      *
39      * @param config
40      *            The bundle configuration as a collection of
41      *            ConfigurationObject
42      * @param storeName
43      *            The identifier for this configuration
44      * @return The Status of the operation
45      */
46     Status persistConfiguration(List<ConfigurationObject> config, String storeName);
47
48     /**
49      * Bundle will call this function to ask Configuration Manager to retrieve
50      * the configuration identified by the passed store name
51      *
52      * @param reader
53      *            The reader object for parsing the configuration provided by
54      *            the caller
55      * @param storeName
56      *            The identifier for the configuration
57      * @return The retrieved configuration as a collection of
58      *         ConfigurationObject
59      */
60     List<ConfigurationObject> retrieveConfiguration(IObjectReader reader, String storeName);
61 }