Upgrade to the Neon base platform
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnClusterOwnershipDriverBase.java
1 /*
2  * Copyright (c) 2015 - 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  * Copyright © 2018 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
10  *
11  * This program and the accompanying materials are made available under the
12  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
13  * and is available at http://www.eclipse.org/legal/epl-v10.html
14  */
15 package org.opendaylight.netvirt.vpnmanager;
16
17 import javax.annotation.PreDestroy;
18 import javax.inject.Inject;
19 import javax.inject.Singleton;
20 import org.opendaylight.netvirt.vpnmanager.api.IVpnClusterOwnershipDriver;
21
22 @Singleton
23 public class VpnClusterOwnershipDriverBase implements IVpnClusterOwnershipDriver, AutoCloseable {
24
25     public static final String VPN_SERVICE_ENTITY = "VPN_SERVICE";
26     protected boolean amIOwner = false;
27
28     @Inject
29     public VpnClusterOwnershipDriverBase() { }
30
31     @Override
32     @PreDestroy
33     public void close() {}
34
35     @Override
36     public boolean amIOwner() {
37         return amIOwner;
38     }
39
40 }