Disconnection improvements.
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceManager.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.device;
10
11 import com.google.common.util.concurrent.CheckedFuture;
12 import javax.annotation.CheckForNull;
13 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
14 import org.opendaylight.openflowplugin.api.openflow.OFPManager;
15 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
16 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
17 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
18 import org.opendaylight.openflowplugin.api.openflow.translator.TranslatorLibrarian;
19
20 /**
21  * This interface is responsible for instantiating DeviceContext and
22  * registering transaction chain for each DeviceContext. Each device
23  * has its own device context managed by this manager.
24  */
25 public interface DeviceManager extends
26         OFPManager,
27         DeviceDisconnectedHandler,
28         TranslatorLibrarian {
29
30     /**
31      * invoked after all services injected.
32      */
33     void initialize();
34
35     void setFlowRemovedNotificationOn(boolean value);
36
37     boolean isFlowRemovedNotificationOn();
38
39     void setSkipTableFeatures(boolean skipTableFeatures);
40
41     void setBarrierCountLimit(int barrierCountLimit);
42
43     void setBarrierInterval(long barrierTimeoutLimit);
44
45     CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(DeviceInfo deviceInfo);
46
47     void setUseSingleLayerSerialization(Boolean useSingleLayerSerilization);
48     DeviceContext createContext(@CheckForNull final ConnectionContext connectionContext);
49
50     long getBarrierIntervalNanos();
51
52     int getBarrierCountLimit();
53 }
54