rediscala icon indicating copy to clipboard operation
rediscala copied to clipboard

name property for RedisServer

Open redlion99 opened this issue 9 years ago • 3 comments

Add name property for RedisServer, so it's possible to add multi connection in the pool for a single server.

redlion99 avatar Jul 11 '16 08:07 redlion99

Coverage Status

Coverage remained the same at 92.502% when pulling 4ab3d2336e655b74409788f30c0b5de3b1574ca0 on redlion99:master into f1c1101a87ebe858f7bcd6b4222e4698c06524df on etaty:master.

coveralls avatar Jul 11 '16 09:07 coveralls

Thanks Could you post a gist to help me understand the use case?

etaty avatar Jul 11 '16 10:07 etaty

Sometimes we need to create more than one connection for a single server. without the name property if we setup a pool like

RedisClientPool( RedisServer("localhost"), RedisServer("localhost"))

We just get one active connection in the pool, because the case class in the key of the connection map has the same hashcode.

if we have a name property it works like this:

RedisClientPool( RedisServer("localhost", name = "a"), RedisServer("localhost", name = "b"))

redlion99 avatar Jul 11 '16 20:07 redlion99