Runtime exception handling in addNewAdjToVpnInterface method
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnClusterShardBasedOwnershipDriver.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.PostConstruct;
18 import javax.annotation.PreDestroy;
19 import javax.inject.Inject;
20 import javax.inject.Singleton;
21 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
22 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory;
24
25
26 @Singleton
27 public class VpnClusterShardBasedOwnershipDriver extends VpnClusterOwnershipDriverBase {
28
29     private static final Logger LOG = LoggerFactory.getLogger(VpnClusterShardBasedOwnershipDriver.class);
30
31     // This file resides to provide an implementation where it will drive amIOwner based on where
32     // the Default Operational Shard (or) Default Config is placed in the 3 PL environment
33     @Inject
34     public VpnClusterShardBasedOwnershipDriver(final EntityOwnershipService entityOwnershipService) {
35     }
36
37     @PostConstruct
38     public void start() {
39         LOG.info("{} start", getClass().getSimpleName());
40     }
41
42     @Override
43     @PreDestroy
44     public void close() {
45         LOG.info("{} closed", getClass().getSimpleName());
46     }
47 }