Fix issues related to checkstyle enforcement
[openflowplugin.git] / applications / reconciliation-framework / src / main / java / org / opendaylight / openflowplugin / applications / reconciliation / ReconciliationNotificationListener.java
1 /*
2  * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.applications.reconciliation;
10
11 import com.google.common.util.concurrent.ListenableFuture;
12 import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.rf.state.rev170713.ResultState;
14
15 /*
16  * Provider to start the reconciliation of a node
17  * Provider to end the reconciliation of a node
18  */
19 public interface ReconciliationNotificationListener extends AutoCloseable {
20     /*
21      * This method will be a callback from RF to start the application
22      * reconciliation. If the reconciliation fails for the services with a priority, the reconciliation of the node for
23      * other services with lower priority has to be carried out or cancelled depending on the resultstate decided by
24      * the services so that it is "fail fast" and doesn't block. This enhancement would be done later and currently the
25      * reconciliation for all the services is carried out irrespective of the intent.
26      *
27      * @param nodeId - Node InstanceIdentifier
28      *
29      * @return the nodeId
30      */
31     ListenableFuture<Boolean> startReconciliation(DeviceInfo node);
32
33     /*
34      * This method will be a callback from RF when dpn disconnects during
35      * reconciliation
36      *
37      * @param nodeId - Node InstanceIdentifier
38      *
39      * @return the nodeId
40      */
41     ListenableFuture<Boolean> endReconciliation(DeviceInfo node);
42
43     /*
44      * Priority of the application. The priority should be a set of values from which the user should be able to select
45      * for the service instead of allowing any random values for priority from the user. Enhancement to be made to
46      * restrict the user to choose from among a set of priorities by making this enum. Also enhancement to be made to
47      * add the service reconciliation property as a configurable property.
48      *
49      * @return the priority of the service
50      */
51     int getPriority();
52
53     /*
54      * Name of the application
55      *
56      * @return the name of the service
57      */
58     String getName();
59
60     /*
61      * Application's intent when the application's reconciliation fails
62      *
63      * @return the intent of the service if the reconciliation fails
64      */
65     ResultState getResultState();
66 }