diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-08-25 14:48:32 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-13 15:50:49 +0200 |
commit | d919b231c0c406899f7ee1f9f2d3775d4d322380 (patch) | |
tree | 2d8615926e6b753b4312ebe7f36f80744a902605 /server/sonar-ce/src/main/java | |
parent | 80269a5d22553335f22f3e8a8a5840724fb154f9 (diff) | |
download | sonarqube-d919b231c0c406899f7ee1f9f2d3775d4d322380.tar.gz sonarqube-d919b231c0c406899f7ee1f9f2d3775d4d322380.zip |
SONAR-9741 rename HazelcastClientWrapper to HazelcastClient
Diffstat (limited to 'server/sonar-ce/src/main/java')
-rw-r--r-- | server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java | 18 | ||||
-rw-r--r-- | server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java index 87436b26d1c..96cfbb6fdf5 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeDistributedInformationImpl.java @@ -26,7 +26,7 @@ import java.util.concurrent.locks.Lock; import org.picocontainer.Startable; import org.sonar.ce.taskprocessor.CeWorkerFactory; import org.sonar.cluster.ClusterObjectKeys; -import org.sonar.cluster.localclient.HazelcastClientWrapper; +import org.sonar.cluster.localclient.HazelcastClient; import static org.sonar.cluster.ClusterObjectKeys.WORKER_UUIDS; import static org.sonar.core.util.stream.MoreCollectors.toSet; @@ -35,17 +35,17 @@ import static org.sonar.core.util.stream.MoreCollectors.toSet; * Provide the set of worker's UUID in a clustered SonarQube instance */ public class CeDistributedInformationImpl implements CeDistributedInformation, Startable { - private final HazelcastClientWrapper hazelcastClientWrapper; + private final HazelcastClient hazelcastClient; private final CeWorkerFactory ceCeWorkerFactory; - public CeDistributedInformationImpl(HazelcastClientWrapper hazelcastClientWrapper, CeWorkerFactory ceCeWorkerFactory) { - this.hazelcastClientWrapper = hazelcastClientWrapper; + public CeDistributedInformationImpl(HazelcastClient hazelcastClient, CeWorkerFactory ceCeWorkerFactory) { + this.hazelcastClient = hazelcastClient; this.ceCeWorkerFactory = ceCeWorkerFactory; } @Override public Set<String> getWorkerUUIDs() { - Set<String> connectedWorkerUUIDs = hazelcastClientWrapper.getConnectedClients(); + Set<String> connectedWorkerUUIDs = hazelcastClient.getConnectedClients(); return getClusteredWorkerUUIDs().entrySet().stream() .filter(e -> connectedWorkerUUIDs.contains(e.getKey())) @@ -56,12 +56,12 @@ public class CeDistributedInformationImpl implements CeDistributedInformation, S @Override public void broadcastWorkerUUIDs() { - getClusteredWorkerUUIDs().put(hazelcastClientWrapper.getClientUUID(), ceCeWorkerFactory.getWorkerUUIDs()); + getClusteredWorkerUUIDs().put(hazelcastClient.getClientUUID(), ceCeWorkerFactory.getWorkerUUIDs()); } @Override public Lock acquireCleanJobLock() { - return hazelcastClientWrapper.getLock(ClusterObjectKeys.CE_CLEANING_JOB_LOCK); + return hazelcastClient.getLock(ClusterObjectKeys.CE_CLEANING_JOB_LOCK); } @Override @@ -72,10 +72,10 @@ public class CeDistributedInformationImpl implements CeDistributedInformation, S @Override public void stop() { // Removing the worker UUIDs - getClusteredWorkerUUIDs().remove(hazelcastClientWrapper.getClientUUID()); + getClusteredWorkerUUIDs().remove(hazelcastClient.getClientUUID()); } private Map<String, Set<String>> getClusteredWorkerUUIDs() { - return hazelcastClientWrapper.getReplicatedMap(WORKER_UUIDS); + return hazelcastClient.getReplicatedMap(WORKER_UUIDS); } } 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 d05761ecd7d..eaf94df4bdc 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 @@ -55,7 +55,7 @@ import org.sonar.ce.settings.ProjectConfigurationFactory; import org.sonar.ce.taskprocessor.CeProcessingScheduler; import org.sonar.ce.taskprocessor.CeTaskProcessorModule; import org.sonar.ce.user.CeUserSession; -import org.sonar.cluster.localclient.HazelcastClientWrapperImpl; +import org.sonar.cluster.localclient.HazelcastLocalClient; import org.sonar.core.component.DefaultResourceTypes; import org.sonar.core.config.ConfigurationProvider; import org.sonar.core.config.CorePropertyDefinitions; @@ -191,7 +191,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer { // TODO refactoring levelXComponents() if (props.valueAsBoolean("sonar.cluster.enabled")) { this.level4.add( - HazelcastClientWrapperImpl.class, + HazelcastLocalClient.class, CeDistributedInformationImpl.class); } else { this.level4.add( |