aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2017-06-19 16:41:19 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-07-05 21:02:58 +0200
commit884e73d80752e779949284176173028f5feb0100 (patch)
treee341f05bb80751f4056a7615d360b6fc9dd7d32e /server/sonar-db-dao/src/main/java/org/sonar/db/DbClient.java
parente964104ca94fdd7b975dedbbe8b15eb578b41f53 (diff)
downloadsonarqube-884e73d80752e779949284176173028f5feb0100.tar.gz
sonarqube-884e73d80752e779949284176173028f5feb0100.zip
MMF-935 experiment ES resilience of user creation
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 f2eb34c6bb1..6eb7c664a25 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
@@ -34,6 +34,7 @@ import org.sonar.db.duplication.DuplicationDao;
import org.sonar.db.event.EventDao;
import org.sonar.db.issue.IssueChangeDao;
import org.sonar.db.issue.IssueDao;
+import org.sonar.db.es.EsQueueDao;
import org.sonar.db.loadedtemplate.LoadedTemplateDao;
import org.sonar.db.measure.MeasureDao;
import org.sonar.db.measure.custom.CustomMeasureDao;
@@ -118,6 +119,7 @@ public class DbClient {
private final UserPermissionDao userPermissionDao;
private final WebhookDeliveryDao webhookDeliveryDao;
private final DefaultQProfileDao defaultQProfileDao;
+ private final EsQueueDao esQueueDao;
public DbClient(Database database, MyBatis myBatis, Dao... daos) {
this.database = database;
@@ -173,6 +175,7 @@ public class DbClient {
userPermissionDao = getDao(map, UserPermissionDao.class);
webhookDeliveryDao = getDao(map, WebhookDeliveryDao.class);
defaultQProfileDao = getDao(map, DefaultQProfileDao.class);
+ esQueueDao = getDao(map, EsQueueDao.class);
}
public DbSession openSession(boolean batch) {
@@ -367,6 +370,10 @@ public class DbClient {
return defaultQProfileDao;
}
+ public EsQueueDao esQueueDao() {
+ return esQueueDao;
+ }
+
protected <K extends Dao> K getDao(Map<Class, Dao> map, Class<K> clazz) {
return (K) map.get(clazz);
}