Class RedisConnector

java.lang.Object
com.kamikazejam.kamicommon.redis.RedisConnector

public class RedisConnector extends Object
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 Details

    • RedisConnector

      public RedisConnector()
  • Method Details

    • getAPI

      @NotNull public static @NotNull RedisAPI getAPI(@NotNull @NotNull RedisConf conf)
      Get a RedisAPI instance for the given connection config.
      Returns:
      A new (or cached) RedisAPI
    • getAPI

      @NotNull public static @NotNull RedisAPI getAPI(@NotNull @NotNull RedisConf conf, @NotNull @NotNull LoggerService logger)
      Get a RedisAPI instance for the given connection config.
      Parameters:
      logger - a LoggerService to 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