From: Sébastien Lesaint Date: Fri, 19 Aug 2016 07:55:51 +0000 (+0200) Subject: SONAR-7825 move CE specific container modules to server-ce X-Git-Tag: 6.1-RC1~331 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2c2a8971841bd9b272d0a2c70e3871f46d41c691;p=sonarqube.git SONAR-7825 move CE specific container modules to server-ce --- 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 index 00000000000..03797845073 --- /dev/null +++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeModule.java @@ -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 index 00000000000..e527998c3ac --- /dev/null +++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java @@ -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); + } +} diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index 84c62415f17..1acda5bf67a 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -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 index 2051a4929e2..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/CeModule.java +++ /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 index c34c9be326f..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/CeQueueModule.java +++ /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); - } -}