Class RedisConnector
java.lang.Object
com.kamikazejam.kamicommon.redis.RedisConnector
The source for all Redis interactions.
Use
getAPI(RedisConf) to fetch a RedisAPI instance.
All instances are cached by connection config, so callers describing the same server share one
client rather than each opening their own.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RedisConnector
public RedisConnector()
-
-
Method Details
-
getAPI
-
getAPI
@NotNull public static @NotNull RedisAPI getAPI(@NotNull @NotNull RedisConf conf, @NotNull @NotNull LoggerService logger) Get aRedisAPIinstance for the given connection config.- Parameters:
logger- aLoggerServiceto use for logging. Only used if this call is the one that creates the client; a cached client keeps the logger it was built with.- Returns:
- A new (or cached)
RedisAPI
-