f9e1faae983da450456c00377b68d234e6aef31e
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / utils / ElanRefUtil.java
1 /*
2  * Copyright (c) 2019 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 package org.opendaylight.netvirt.elan.l2gw.utils;
9
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;
24
25 @Singleton
26 public class ElanRefUtil {
27
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;
40
41     @Inject
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,
50                        ElanUtils elanUtils,
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;
66     }
67
68     public DataBroker getDataBroker() {
69         return dataBroker;
70     }
71
72     public ElanClusterUtils getElanClusterUtils() {
73         return elanClusterUtils;
74     }
75
76     public ElanGroupCache getElanGroupCache() {
77         return elanGroupCache;
78     }
79
80     public ElanInstanceCache getElanInstanceCache() {
81         return elanInstanceCache;
82     }
83
84     public ElanInstanceDpnsCache getElanInstanceDpnsCache() {
85         return elanInstanceDpnsCache;
86     }
87
88     public ElanInterfaceCache getElanInterfaceCache() {
89         return elanInterfaceCache;
90     }
91
92     public ElanItmUtils getElanItmUtils() {
93         return elanItmUtils;
94     }
95
96     public ElanMacTableCache getElanMacTableCache() {
97         return elanMacTableCache;
98     }
99
100     public ElanUtils getElanUtils() {
101         return elanUtils;
102     }
103
104     public HwvtepConfigNodeCache getHwvtepConfigNodeCache() {
105         return hwvtepConfigNodeCache;
106     }
107
108     public JobCoordinator getJobCoordinator() {
109         return jobCoordinator;
110     }
111
112     public Scheduler getScheduler() {
113         return scheduler;
114     }
115 }