Package nablarch.integration.health
Class RedisHealthChecker
java.lang.Object
nablarch.fw.web.handler.health.HealthChecker
nablarch.integration.health.RedisHealthChecker
Redisのヘルスチェックを行うクラス。
キーの存在チェックを行い、例外が発生しなければヘルシと判断する。
キーのデフォルトは"healthcheck"。
キーは存在しなくてよい。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetClient(LettuceRedisClient client) Redisのクライアントを設定する。void存在チェックに使用するキーを設定する。protected booleantryOut(HttpRequest request, ExecutionContext context) ヘルシーと判断できる処理を試す。Methods inherited from class nablarch.fw.web.handler.health.HealthChecker
check, getName, setName
-
Constructor Details
-
RedisHealthChecker
public RedisHealthChecker()
-
-
Method Details
-
tryOut
Description copied from class:HealthCheckerヘルシーと判断できる処理を試す。- Specified by:
tryOutin classHealthChecker- Parameters:
request- リクエストcontext- コンテキスト- Returns:
- ヘルシーな場合はtrue
-
setClient
Redisのクライアントを設定する。- Parameters:
client- Redisのクライアント
-
setKey
存在チェックに使用するキーを設定する。- Parameters:
key- 存在チェックに使用するキー
-