Mcast population during cluster reboot
[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
13 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
14 import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
15 import org.opendaylight.netvirt.elan.cache.ConfigMcastCache;
16 import org.opendaylight.netvirt.elan.cache.ElanInstanceCache;
17 import org.opendaylight.netvirt.elan.cache.ElanInstanceDpnsCache;
18 import org.opendaylight.netvirt.elan.cache.ElanInterfaceCache;
19 import org.opendaylight.netvirt.elan.utils.ElanClusterUtils;
20 import org.opendaylight.netvirt.elan.utils.Scheduler;
21
22 @Singleton
23 public class ElanRefUtil {
24
25     private final DataBroker dataBroker;
26     private final ElanClusterUtils elanClusterUtils;
27     private final Scheduler scheduler;
28     private final JobCoordinator jobCoordinator;
29     private final ElanInstanceCache elanInstanceCache;
30     private final ElanInstanceDpnsCache elanInstanceDpnsCache;
31     private final ElanInterfaceCache elanInterfaceCache;
32     private final ConfigMcastCache configMcastCache;
33
34     @Inject
35     public ElanRefUtil(DataBroker dataBroker,
36                        ElanClusterUtils elanClusterUtils,
37                        ElanInstanceCache elanInstanceCache,
38                        ElanInstanceDpnsCache elanInstanceDpnsCache,
39                        ElanInterfaceCache elanInterfaceCache,
40                        ConfigMcastCache configMcastCache,
41                        JobCoordinator jobCoordinator,
42                        Scheduler scheduler) {
43         this.dataBroker = dataBroker;
44         this.elanClusterUtils = elanClusterUtils;
45         this.elanInstanceCache = elanInstanceCache;
46         this.elanInstanceDpnsCache = elanInstanceDpnsCache;
47         this.elanInterfaceCache = elanInterfaceCache;
48         this.configMcastCache = configMcastCache;
49         this.jobCoordinator = jobCoordinator;
50         this.scheduler = scheduler;
51     }
52
53     public DataBroker getDataBroker() {
54         return dataBroker;
55     }
56
57     public ElanClusterUtils getElanClusterUtils() {
58         return elanClusterUtils;
59     }
60
61     public ElanInstanceCache getElanInstanceCache() {
62         return elanInstanceCache;
63     }
64
65     public ElanInstanceDpnsCache getElanInstanceDpnsCache() {
66         return elanInstanceDpnsCache;
67     }
68
69     public ElanInterfaceCache getElanInterfaceCache() {
70         return elanInterfaceCache;
71     }
72
73     public JobCoordinator getJobCoordinator() {
74         return jobCoordinator;
75     }
76
77     public Scheduler getScheduler() {
78         return scheduler;
79     }
80
81     public ConfigMcastCache getConfigMcastCache() {
82         return configMcastCache;
83     }
84 }