Bug 6110: Fixed bugs in statistics manager due to race condition.
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / OpenFlowPluginProvider.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;
10
11 import java.util.Collection;
12 import java.util.Map;
13 import org.opendaylight.controller.md.sal.binding.api.BindingService;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
16 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
17 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
18 import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider;
19 import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
20
21 /**
22  * Plugin services provider
23  */
24 public interface OpenFlowPluginProvider extends AutoCloseable, BindingService {
25
26     /**
27      * Method sets openflow java's connection providers.
28      */
29     void setSwitchConnectionProviders(Collection<SwitchConnectionProvider> switchConnectionProvider);
30
31     /**
32      * setter
33      *
34      * @param dataBroker
35      */
36     void setDataBroker(DataBroker dataBroker);
37
38     void setRpcProviderRegistry(RpcProviderRegistry rpcProviderRegistry);
39
40     void setNotificationProviderService(NotificationService notificationProviderService);
41
42     void setNotificationPublishService(NotificationPublishService notificationPublishService);
43
44     /**
45      * Method initializes all DeviceManager, RpcManager and related contexts.
46      */
47     void initialize();
48
49     /**
50      * This parameter indicates whether it is mandatory for switch to support OF1.3 features : table, flow, meter,group.
51      * If this is set to true and switch doesn't support these features its connection will be denied.
52      * @param switchFeaturesMandatory
53      */
54     void setSwitchFeaturesMandatory(final boolean switchFeaturesMandatory);
55
56     boolean isSwitchFeaturesMandatory();
57
58     boolean isStatisticsPollingOn();
59
60     void setStatisticsPollingOn(final boolean isStatisticsPollingOn);
61
62     /**
63      * Backward compatibility feature - exposing rpc for statistics polling (result is provided in form of async notification)
64      *
65      * @param isStatisticsRpcEnabled
66      */
67     void setIsStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
68
69     void setBarrierCountLimit(int barrierCountLimit);
70
71     void setBarrierInterval(long barrierTimeoutLimit);
72
73     void setEchoReplyTimeout(long echoReplyTimeout);
74
75     void setFlowRemovedNotification(boolean isFlowRemovedNotificationOn);
76
77     void update(Map<String,Object> props);
78
79     void setClusteringSingletonServicesProvider(ClusterSingletonServiceProvider singletonServicesProvider);
80
81     void setSkipTableFeatures(boolean skipTableFeatures);
82
83     void setBasicTimerDelay(long basicTimerDelay);
84
85     void setMaximumTimerDelay(long maximumTimerDelay);
86 }