mirror of
https://github.com/SonarSource/sonarqube.git
synced 2024-07-28 20:18:04 +02:00
SONAR-9741 put key of SharedHealthState map in ClusterObjectKeys
This commit is contained in:
parent
381beaa378
commit
802231001d
@ -70,10 +70,13 @@ public final class ClusterObjectKeys {
|
||||
* The key of replicated map holding the CeWorker UUIDs
|
||||
*/
|
||||
public static final String WORKER_UUIDS = "WORKER_UUIDS";
|
||||
|
||||
/**
|
||||
* The key of the lock for executing CE_CLEANING_JOB
|
||||
* {@link CeCleaningSchedulerImpl}
|
||||
*/
|
||||
public static final String CE_CLEANING_JOB_LOCK = "CE_CLEANING_JOB_LOCK";
|
||||
/**
|
||||
* THe key of the replicated map holding the health state information of all SQ nodes.
|
||||
*/
|
||||
public static final String SQ_HEALTH_STATE = "sq_health_state";
|
||||
}
|
||||
|
@ -27,12 +27,12 @@ import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import org.sonar.api.utils.log.Logger;
|
||||
import org.sonar.api.utils.log.Loggers;
|
||||
import org.sonar.cluster.ClusterObjectKeys;
|
||||
import org.sonar.cluster.localclient.HazelcastClient;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
public class SharedHealthStateImpl implements SharedHealthState {
|
||||
private static final String SQ_HEALTH_STATE_REPLICATED_MAP_IDENTIFIER = "sq_health_state";
|
||||
private static final Logger LOG = Loggers.get(SharedHealthStateImpl.class);
|
||||
private static final int TIMEOUT_30_SECONDS = 30 * 1000;
|
||||
|
||||
@ -101,7 +101,7 @@ public class SharedHealthStateImpl implements SharedHealthState {
|
||||
}
|
||||
|
||||
private Map<String, TimestampedNodeHealth> readReplicatedMap() {
|
||||
return hazelcastClient.getReplicatedMap(SQ_HEALTH_STATE_REPLICATED_MAP_IDENTIFIER);
|
||||
return hazelcastClient.getReplicatedMap(ClusterObjectKeys.SQ_HEALTH_STATE);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user