Adding BC group update job.
[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.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;
20
21 @Singleton
22 public class ElanRefUtil {
23
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
32     @Inject
33     public ElanRefUtil(DataBroker dataBroker,
34                        ElanClusterUtils elanClusterUtils,
35                        ElanInstanceCache elanInstanceCache,
36                        ElanInstanceDpnsCache elanInstanceDpnsCache,
37                        ElanInterfaceCache elanInterfaceCache,
38                        JobCoordinator jobCoordinator,
39                        Scheduler scheduler) {
40         this.dataBroker = dataBroker;
41         this.elanClusterUtils = elanClusterUtils;
42         this.elanInstanceCache = elanInstanceCache;
43         this.elanInstanceDpnsCache = elanInstanceDpnsCache;
44         this.elanInterfaceCache = elanInterfaceCache;
45         this.jobCoordinator = jobCoordinator;
46         this.scheduler = scheduler;
47     }
48
49     public DataBroker getDataBroker() {
50         return dataBroker;
51     }
52
53     public ElanClusterUtils getElanClusterUtils() {
54         return elanClusterUtils;
55     }
56
57     public ElanInstanceCache getElanInstanceCache() {
58         return elanInstanceCache;
59     }
60
61     public ElanInstanceDpnsCache getElanInstanceDpnsCache() {
62         return elanInstanceDpnsCache;
63     }
64
65     public ElanInterfaceCache getElanInterfaceCache() {
66         return elanInterfaceCache;
67     }
68
69     public JobCoordinator getJobCoordinator() {
70         return jobCoordinator;
71     }
72
73     public Scheduler getScheduler() {
74         return scheduler;
75     }
76 }