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.ConfigMcastCache;
15 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
16 import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
17 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
18 import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
19 import org.opendaylight.netvirt.elan.utils.Scheduler;
22 public class ElanRefUtil {
24 private final DataBroker dataBroker;
25 private final ElanClusterUtils elanClusterUtils;
26 private final Scheduler scheduler;
27 private final JobCoordinator jobCoordinator;
28 private final ElanInstanceCache elanInstanceCache;
29 private final ElanInstanceDpnsCache elanInstanceDpnsCache;
30 private final ElanInterfaceCache elanInterfaceCache;
31 private final ConfigMcastCache configMcastCache;
34 public ElanRefUtil(DataBroker dataBroker,
35 ElanClusterUtils elanClusterUtils,
36 ElanInstanceCache elanInstanceCache,
37 ElanInstanceDpnsCache elanInstanceDpnsCache,
38 ElanInterfaceCache elanInterfaceCache,
39 ConfigMcastCache configMcastCache,
40 JobCoordinator jobCoordinator,
41 Scheduler scheduler) {
42 this.dataBroker = dataBroker;
43 this.elanClusterUtils = elanClusterUtils;
44 this.elanInstanceCache = elanInstanceCache;
45 this.elanInstanceDpnsCache = elanInstanceDpnsCache;
46 this.elanInterfaceCache = elanInterfaceCache;
47 this.configMcastCache = configMcastCache;
48 this.jobCoordinator = jobCoordinator;
49 this.scheduler = scheduler;
52 public DataBroker getDataBroker() {
56 public ElanClusterUtils getElanClusterUtils() {
57 return elanClusterUtils;
60 public ElanInstanceCache getElanInstanceCache() {
61 return elanInstanceCache;
64 public ElanInstanceDpnsCache getElanInstanceDpnsCache() {
65 return elanInstanceDpnsCache;
68 public ElanInterfaceCache getElanInterfaceCache() {
69 return elanInterfaceCache;
72 public JobCoordinator getJobCoordinator() {
73 return jobCoordinator;
76 public Scheduler getScheduler() {
80 public ConfigMcastCache getConfigMcastCache() {
81 return configMcastCache;