Remove unused classes and methods

This commit is contained in:
Chris Eager
2022-03-08 17:19:20 -08:00
committed by Jon Chambers
parent 7a5615182a
commit fef37f739b
7 changed files with 4 additions and 80 deletions

View File

@@ -1,32 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.providers;
import com.codahale.metrics.health.HealthCheck;
import org.whispersystems.textsecuregcm.redis.ReplicatedJedisPool;
import redis.clients.jedis.Jedis;
public class RedisHealthCheck extends HealthCheck {
private final ReplicatedJedisPool clientPool;
public RedisHealthCheck(ReplicatedJedisPool clientPool) {
this.clientPool = clientPool;
}
@Override
protected Result check() throws Exception {
try (Jedis client = clientPool.getWriteResource()) {
client.set("HEALTH", "test");
if (!"test".equals(client.get("HEALTH"))) {
return Result.unhealthy("fetch failed");
}
return Result.healthy();
}
}
}