hungphan227 commented on code in PR #2420:
URL: https://github.com/apache/james-project/pull/2420#discussion_r1774980497


##########
backends-common/redis/src/main/java/org/apache/james/backends/redis/RedisConfiguration.scala:
##########
@@ -158,4 +162,26 @@ case class ClusterRedisConfiguration(redisURI: RedisUris, 
ioThreads: Option[Int]
     .add("redis.ioThreads", ioThreads)
     .add("redis.workerThreads", workerThreads)
     .toString
+}
+
+object SentinelRedisConfiguration {
+  def from(config: Configuration): SentinelRedisConfiguration = from(
+    config.getStringArray(REDIS_URL_PROPERTY_NAME).mkString(","),
+    Option(config.getString(REDIS_READ_FROM_PROPERTY_NAME, 
null)).map(ReadFrom.valueOf).getOrElse(REDIS_READ_FROM_DEFAULT_VALUE),
+    RedisConfiguration.redisIoThreadsFrom(config),
+    RedisConfiguration.redisWorkerThreadsFrom(config))
+
+  def from(redisUri: String, readFrom: ReadFrom): SentinelRedisConfiguration = 
from(redisUri, readFrom, None, None)
+
+  def from(redisUri: String, readFrom: ReadFrom, ioThreads: Option[Int] = 
None, workerThreads: Option[Int] = None): SentinelRedisConfiguration =
+    SentinelRedisConfiguration(RedisURI.create(redisUri), readFrom, ioThreads, 
workerThreads)
+}
+
+case class SentinelRedisConfiguration(redisURI: RedisURI, readFrom: ReadFrom, 
ioThreads: Option[Int], workerThreads: Option[Int]) extends RedisConfiguration {

Review Comment:
   Removed in HealthCheck. About RateLimiter, so far I have not found yet a way 
to use readForm for sentinel. It seems Lettuce only support readFrom for 
master-replica api (https://github.com/redis/lettuce/wiki/ReadFrom-Settings)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to