Bug 6465 Controller goes into slave mode
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / handlers / ClusterInitializationPhaseHandler.java
1 /**
2  * Copyright (c) 2016 Pantheon Technologies s.r.o. 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 package org.opendaylight.openflowplugin.api.openflow.device.handlers;
9
10 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
11
12 /**
13  * Interface handles MASTER initialization on ownership change
14  */
15 public interface ClusterInitializationPhaseHandler {
16
17     /**
18      * Method for initialization cycle between contexts
19      * @param connectionContext to check actual connection state
20      */
21     boolean onContextInstantiateService(final ConnectionContext connectionContext);
22
23     /**
24      * Method for initial submit transaction after successful initial gathering
25      */
26     default void initialSubmitTransaction(){
27         //This method need to be override only in device context to submit initial data
28     }
29 }