]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7825 move CE specific container modules to server-ce
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 19 Aug 2016 07:55:51 +0000 (09:55 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Tue, 23 Aug 2016 13:14:18 +0000 (15:14 +0200)
server/sonar-ce/src/main/java/org/sonar/ce/CeModule.java [new file with mode: 0644]
server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java [new file with mode: 0644]
server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
server/sonar-server/src/main/java/org/sonar/server/computation/CeModule.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/computation/CeQueueModule.java [deleted file]

diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeModule.java
new file mode 100644 (file)
index 0000000..0379784
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.ce;
+
+import org.sonar.ce.log.CeLogging;
+import org.sonar.core.platform.Module;
+import org.sonar.db.purge.period.DefaultPeriodCleaner;
+import org.sonar.process.systeminfo.ProcessStateSystemInfo;
+import org.sonar.process.systeminfo.SystemInfoHttpServer;
+import org.sonar.server.computation.configuration.CeConfigurationImpl;
+import org.sonar.server.computation.dbcleaner.IndexPurgeListener;
+import org.sonar.server.computation.dbcleaner.ProjectCleaner;
+import org.sonar.server.computation.monitoring.CeDatabaseMBeanImpl;
+
+/**
+ * Globally available components in CE
+ */
+public class CeModule extends Module {
+  @Override
+  protected void configureModule() {
+    add(
+      CeConfigurationImpl.class,
+      CeLogging.class,
+      CeDatabaseMBeanImpl.class,
+      SystemInfoHttpServer.class,
+      new ProcessStateSystemInfo("Compute Engine State"),
+
+      DefaultPeriodCleaner.class,
+      ProjectCleaner.class,
+      IndexPurgeListener.class);
+  }
+}
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
new file mode 100644 (file)
index 0000000..e527998
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonar.ce;
+
+import org.sonar.core.platform.Module;
+import org.sonar.server.computation.monitoring.CEQueueStatusImpl;
+import org.sonar.server.computation.monitoring.CeTasksMBeanImpl;
+import org.sonar.server.computation.queue.CeQueueCleaner;
+import org.sonar.server.computation.queue.CeQueueInitializer;
+import org.sonar.server.computation.queue.InternalCeQueueImpl;
+
+public class CeQueueModule extends Module {
+  @Override
+  protected void configureModule() {
+    add(
+      // queue state
+      InternalCeQueueImpl.class,
+
+      // queue monitoring
+      CEQueueStatusImpl.class,
+      CeTasksMBeanImpl.class,
+
+      // queue cleaning
+      CeQueueCleaner.class,
+      
+      // init queue state and queue processing
+      CeQueueInitializer.class);
+  }
+}
index 84c62415f175153ea17f9209d4e0aff07b48619d..1acda5bf67a0fb25c85d6d9890fe30687b40bde1 100644 (file)
@@ -69,8 +69,8 @@ import org.sonar.server.activity.index.ActivityIndexer;
 import org.sonar.server.component.ComponentCleanerService;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.component.ComponentService;
-import org.sonar.server.computation.CeModule;
-import org.sonar.server.computation.CeQueueModule;
+import org.sonar.ce.CeModule;
+import org.sonar.ce.CeQueueModule;
 import org.sonar.server.computation.task.projectanalysis.ProjectAnalysisTaskModule;
 import org.sonar.server.computation.taskprocessor.CeTaskProcessorModule;
 import org.sonar.server.debt.DebtModelPluginRepository;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/CeModule.java b/server/sonar-server/src/main/java/org/sonar/server/computation/CeModule.java
deleted file mode 100644 (file)
index 2051a49..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.server.computation;
-
-import org.sonar.ce.log.CeLogging;
-import org.sonar.core.platform.Module;
-import org.sonar.db.purge.period.DefaultPeriodCleaner;
-import org.sonar.process.systeminfo.ProcessStateSystemInfo;
-import org.sonar.process.systeminfo.SystemInfoHttpServer;
-import org.sonar.server.computation.configuration.CeConfigurationImpl;
-import org.sonar.server.computation.dbcleaner.IndexPurgeListener;
-import org.sonar.server.computation.dbcleaner.ProjectCleaner;
-import org.sonar.server.computation.monitoring.CeDatabaseMBeanImpl;
-
-/**
- * Globally available components in CE
- */
-public class CeModule extends Module {
-  @Override
-  protected void configureModule() {
-    add(
-      CeConfigurationImpl.class,
-      CeLogging.class,
-      CeDatabaseMBeanImpl.class,
-      SystemInfoHttpServer.class,
-      new ProcessStateSystemInfo("Compute Engine State"),
-
-      DefaultPeriodCleaner.class,
-      ProjectCleaner.class,
-      IndexPurgeListener.class);
-  }
-}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/CeQueueModule.java b/server/sonar-server/src/main/java/org/sonar/server/computation/CeQueueModule.java
deleted file mode 100644 (file)
index c34c9be..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-package org.sonar.server.computation;
-
-import org.sonar.core.platform.Module;
-import org.sonar.server.computation.monitoring.CEQueueStatusImpl;
-import org.sonar.server.computation.monitoring.CeTasksMBeanImpl;
-import org.sonar.server.computation.queue.CeQueueCleaner;
-import org.sonar.server.computation.queue.CeQueueInitializer;
-import org.sonar.server.computation.queue.InternalCeQueueImpl;
-
-public class CeQueueModule extends Module {
-  @Override
-  protected void configureModule() {
-    add(
-      // queue state
-      InternalCeQueueImpl.class,
-
-      // queue monitoring
-      CEQueueStatusImpl.class,
-      CeTasksMBeanImpl.class,
-
-      // queue cleaning
-      CeQueueCleaner.class,
-      
-      // init queue state and queue processing
-      CeQueueInitializer.class);
-  }
-}