aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-11-23 11:13:26 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-12-05 09:29:16 +0100
commitd987a6a527bc10734fd9402ce728d27359ccdc41 (patch)
treed7ab4aa81326e522a512d8674f6a59ba282c45ae /server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
parent05677f8e3e0a0a281dd6adbbcbad9a4be7cfaea6 (diff)
downloadsonarqube-d987a6a527bc10734fd9402ce728d27359ccdc41.tar.gz
sonarqube-d987a6a527bc10734fd9402ce728d27359ccdc41.zip
SONAR-10116 Better scalability of loading of project measures
Diffstat (limited to 'server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
index 1cc3778af49..ce3e71e8087 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
@@ -37,6 +37,7 @@ import org.sonar.db.es.EsQueueDao;
import org.sonar.db.event.EventDao;
import org.sonar.db.issue.IssueChangeDao;
import org.sonar.db.issue.IssueDao;
+import org.sonar.db.measure.LiveMeasureDao;
import org.sonar.db.measure.MeasureDao;
import org.sonar.db.measure.custom.CustomMeasureDao;
import org.sonar.db.metric.MetricDao;
@@ -130,6 +131,7 @@ public class DbClient {
private final AnalysisPropertiesDao analysisPropertiesDao;
private final QProfileEditUsersDao qProfileEditUsersDao;
private final QProfileEditGroupsDao qProfileEditGroupsDao;
+ private final LiveMeasureDao liveMeasureDao;
public DbClient(Database database, MyBatis myBatis, DBSessions dbSessions, Dao... daos) {
this.database = database;
@@ -191,6 +193,7 @@ public class DbClient {
analysisPropertiesDao = getDao(map, AnalysisPropertiesDao.class);
qProfileEditUsersDao = getDao(map, QProfileEditUsersDao.class);
qProfileEditGroupsDao = getDao(map, QProfileEditGroupsDao.class);
+ liveMeasureDao = getDao(map, LiveMeasureDao.class);
}
public DbSession openSession(boolean batch) {
@@ -405,6 +408,10 @@ public class DbClient {
return qProfileEditGroupsDao;
}
+ public LiveMeasureDao liveMeasureDao() {
+ return liveMeasureDao;
+ }
+
protected <K extends Dao> K getDao(Map<Class, Dao> map, Class<K> clazz) {
return (K) map.get(clazz);
}