Class AbstractRedisClientFactory<K,V>

java.lang.Object
io.micronaut.configuration.lettuce.AbstractRedisClientFactory<K,V>
Type Parameters:
K - Key type
V - Value type
Direct Known Subclasses:
DefaultRedisClientFactory, NamedRedisClientFactory

public abstract class AbstractRedisClientFactory<K,V> extends Object
Abstract version of a factory class for creating Redis clients.
Since:
1.0
Author:
Graeme Rocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.lettuce.core.codec.RedisCodec<K,V>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractRedisClientFactory(io.lettuce.core.codec.RedisCodec<K,V> defaultCodec)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.lettuce.core.RedisClient
    Creates the RedisClient from the configuration.
    io.lettuce.core.RedisClient
    redisClient(AbstractRedisConfiguration config, @Nullable io.lettuce.core.resource.ClientResources optionalClientResources, @Nullable List<ClientResourcesMutator> mutators)
    Creates the RedisClient from the configuration.
    io.lettuce.core.api.StatefulRedisConnection<K,V>
    redisConnection(io.lettuce.core.RedisClient redisClient, io.lettuce.core.codec.RedisCodec<K,V> codec)
    Creates the StatefulRedisConnection from the RedisClient.
    io.lettuce.core.pubsub.StatefulRedisPubSubConnection<K,V>
    redisPubSubConnection(io.lettuce.core.RedisClient redisClient, io.lettuce.core.codec.RedisCodec<K,V> codec)
    Creates the StatefulRedisPubSubConnection from the RedisClient.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • defaultCodec

      protected final io.lettuce.core.codec.RedisCodec<K,V> defaultCodec
  • Constructor Details

    • AbstractRedisClientFactory

      protected AbstractRedisClientFactory(io.lettuce.core.codec.RedisCodec<K,V> defaultCodec)
      Parameters:
      defaultCodec - The default codec
  • Method Details

    • redisClient

      public io.lettuce.core.RedisClient redisClient(AbstractRedisConfiguration config)
      Creates the RedisClient from the configuration.
      Parameters:
      config - The configuration
      Returns:
      The RedisClient
    • redisClient

      public io.lettuce.core.RedisClient redisClient(AbstractRedisConfiguration config, @Nullable @Nullable io.lettuce.core.resource.ClientResources optionalClientResources, @Nullable @Nullable List<ClientResourcesMutator> mutators)
      Creates the RedisClient from the configuration.
      Parameters:
      config - The configuration
      optionalClientResources - The ClientResources
      mutators - The list of mutators
      Returns:
      The RedisClient
    • redisConnection

      public io.lettuce.core.api.StatefulRedisConnection<K,V> redisConnection(io.lettuce.core.RedisClient redisClient, io.lettuce.core.codec.RedisCodec<K,V> codec)
      Creates the StatefulRedisConnection from the RedisClient.
      Parameters:
      redisClient - The RedisClient
      codec - The codec to use
      Returns:
      The StatefulRedisConnection
    • redisPubSubConnection

      public io.lettuce.core.pubsub.StatefulRedisPubSubConnection<K,V> redisPubSubConnection(io.lettuce.core.RedisClient redisClient, io.lettuce.core.codec.RedisCodec<K,V> codec)
      Creates the StatefulRedisPubSubConnection from the RedisClient.
      Parameters:
      redisClient - The RedisClient
      codec - The codec to use
      Returns:
      The StatefulRedisPubSubConnection