2 * Copyright (c) 2019 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
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
8 package org.opendaylight.netvirt.elan.l2gw.utils;
10 import javax.inject.Inject;
11 import javax.inject.Singleton;
12 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
13 import org.opendaylight.mdsal.binding.api.DataBroker;
14 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
15 import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
16 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
17 import org.opendaylight.netvirt.elan.internal.ElanGroupCache;
18 import org.opendaylight.netvirt.elan.l2gw.listeners.ElanMacTableCache;
19 import org.opendaylight.netvirt.elan.l2gw.listeners.HwvtepConfigNodeCache;
20 import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
21 import org.opendaylight.netvirt.elan.utils.ElanItmUtils;
22 import org.opendaylight.netvirt.elan.utils.ElanUtils;
23 import org.opendaylight.netvirt.elan.utils.Scheduler;
26 public class ElanRefUtil {
28 private final DataBroker dataBroker;
29 private final ElanClusterUtils elanClusterUtils;
30 private final Scheduler scheduler;
31 private final JobCoordinator jobCoordinator;
32 private final ElanInstanceCache elanInstanceCache;
33 private final ElanInstanceDpnsCache elanInstanceDpnsCache;
34 private final ElanInterfaceCache elanInterfaceCache;
35 private final ElanMacTableCache elanMacTableCache;
36 private final ElanGroupCache elanGroupCache;
37 private final HwvtepConfigNodeCache hwvtepConfigNodeCache;
38 private final ElanUtils elanUtils;
39 private final ElanItmUtils elanItmUtils;
42 public ElanRefUtil(DataBroker dataBroker,
43 ElanClusterUtils elanClusterUtils,
44 ElanGroupCache elanGroupCache,
45 ElanInstanceCache elanInstanceCache,
46 ElanInstanceDpnsCache elanInstanceDpnsCache,
47 ElanInterfaceCache elanInterfaceCache,
48 ElanItmUtils elanItmUtils,
49 ElanMacTableCache elanMacTableCache,
51 HwvtepConfigNodeCache hwvtepConfigNodeCache,
52 JobCoordinator jobCoordinator,
53 Scheduler scheduler) {
54 this.dataBroker = dataBroker;
55 this.elanClusterUtils = elanClusterUtils;
56 this.elanGroupCache = elanGroupCache;
57 this.elanInstanceCache = elanInstanceCache;
58 this.elanInstanceDpnsCache = elanInstanceDpnsCache;
59 this.elanInterfaceCache = elanInterfaceCache;
60 this.elanItmUtils = elanItmUtils;
61 this.elanMacTableCache = elanMacTableCache;
62 this.elanUtils = elanUtils;
63 this.hwvtepConfigNodeCache = hwvtepConfigNodeCache;
64 this.jobCoordinator = jobCoordinator;
65 this.scheduler = scheduler;
68 public DataBroker getDataBroker() {
72 public ElanClusterUtils getElanClusterUtils() {
73 return elanClusterUtils;
76 public ElanGroupCache getElanGroupCache() {
77 return elanGroupCache;
80 public ElanInstanceCache getElanInstanceCache() {
81 return elanInstanceCache;
84 public ElanInstanceDpnsCache getElanInstanceDpnsCache() {
85 return elanInstanceDpnsCache;
88 public ElanInterfaceCache getElanInterfaceCache() {
89 return elanInterfaceCache;
92 public ElanItmUtils getElanItmUtils() {
96 public ElanMacTableCache getElanMacTableCache() {
97 return elanMacTableCache;
100 public ElanUtils getElanUtils() {
104 public HwvtepConfigNodeCache getHwvtepConfigNodeCache() {
105 return hwvtepConfigNodeCache;
108 public JobCoordinator getJobCoordinator() {
109 return jobCoordinator;
112 public Scheduler getScheduler() {