Extract mastership blueprint service
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / mastership / MastershipChangeServiceManager.java
1 /*
2  * Copyright (c) 2017 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.mastership;
9
10 import javax.annotation.Nonnull;
11 import org.opendaylight.openflowplugin.api.openflow.lifecycle.OwnershipChangeListener;
12
13 /**
14  * Provider to register mastership change listener.
15  * @since 0.5.0 Nitrogen
16  */
17 public interface MastershipChangeServiceManager extends OwnershipChangeListener, AutoCloseable {
18
19     @Nonnull
20     MastershipChangeRegistration register(@Nonnull MastershipChangeService service);
21
22     void unregister(@Nonnull MastershipChangeService service);
23
24     @Override
25     void close();
26 }