Class AbstractRedisConfiguration

java.lang.Object
io.lettuce.core.RedisURI
io.micronaut.configuration.lettuce.AbstractRedisConfiguration
All Implemented Interfaces:
io.lettuce.core.ConnectionPoint, io.micronaut.core.naming.Named, Serializable
Direct Known Subclasses:
DefaultRedisConfiguration, NamedRedisServersConfiguration

public abstract class AbstractRedisConfiguration extends io.lettuce.core.RedisURI implements io.micronaut.core.naming.Named
Abstract configuration for Lettuce.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.lettuce.core.RedisURI

    io.lettuce.core.RedisURI.Builder
  • Field Summary

    Fields inherited from class io.lettuce.core.RedisURI

    CONVERTER_MAP, DEFAULT_REDIS_PORT, DEFAULT_SENTINEL_PORT, DEFAULT_TIMEOUT, DEFAULT_TIMEOUT_DURATION, PARAMETER_NAME_CLIENT_NAME, PARAMETER_NAME_DATABASE, PARAMETER_NAME_DATABASE_ALT, PARAMETER_NAME_LIBRARY_NAME, PARAMETER_NAME_LIBRARY_VERSION, PARAMETER_NAME_SENTINEL_MASTER_ID, PARAMETER_NAME_TIMEOUT, PARAMETER_NAME_VERIFY_PEER, URI_SCHEME_REDIS, URI_SCHEME_REDIS_SECURE, URI_SCHEME_REDIS_SECURE_ALT, URI_SCHEME_REDIS_SENTINEL, URI_SCHEME_REDIS_SENTINEL_SECURE, URI_SCHEME_REDIS_SOCKET, URI_SCHEME_REDIS_SOCKET_ALT, URI_SCHEME_REDIS_TLS_ALT
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the pool size (number of threads) for all computation tasks.
    Returns the pool size (number of threads) for IO threads.
     
    Optional<io.lettuce.core.RedisURI>
     
    List<io.lettuce.core.RedisURI>
     
    void
    setComputationThreadPoolSize(Integer computationThreadPoolSize)
    Sets the thread pool size (number of threads to use) for computation operations (default value is the number of CPUs).
    void
    setIoThreadPoolSize(Integer ioThreadPoolSize)
    Sets the thread pool size (number of threads to use) for I/O operations (default value is the number of CPUs).
    void
    Sets the name of the bean.
    void
    setUri(URI uri)
    Sets the Redis URI for configuration by string.
    void
    setUris(URI... uris)
    Sets the Redis URIs for cluster configuration.

    Methods inherited from class io.lettuce.core.RedisURI

    applyAuthentication, applySsl, builder, builder, create, create, create, equals, getClientName, getCredentialsProvider, getDatabase, getHost, getLibraryName, getLibraryVersion, getPassword, getPort, getSentinelMasterId, getSentinels, getSocket, getTimeout, getUsername, getVerifyMode, hashCode, isSsl, isStartTls, isVerifyPeer, setClientName, setCredentialsProvider, setDatabase, setHost, setLibraryName, setLibraryVersion, setPassword, setPassword, setPassword, setPort, setSentinelMasterId, setSocket, setSsl, setStartTls, setTimeout, setUsername, setVerifyPeer, setVerifyPeer, toString, toURI

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AbstractRedisConfiguration

      protected AbstractRedisConfiguration()
      Constructor.
  • Method Details

    • getUri

      public Optional<io.lettuce.core.RedisURI> getUri()
      Returns:
      Get the Redis URI for configuration.
    • setUri

      public void setUri(URI uri)
      Sets the Redis URI for configuration by string.
      Parameters:
      uri - The URI
    • getUris

      public List<io.lettuce.core.RedisURI> getUris()
      Returns:
      Get the Redis URIs for cluster configuration.
    • setUris

      public void setUris(URI... uris)
      Sets the Redis URIs for cluster configuration.
      Parameters:
      uris - The URI
    • getIoThreadPoolSize

      public Integer getIoThreadPoolSize()
      Returns the pool size (number of threads) for IO threads. The indicated size does not reflect the number for all IO threads. TCP and socket connections (epoll) require different IO pool. ClientResources.ioThreadPoolSize()
      Returns:
      the pool size (number of threads) for all IO tasks.
    • setIoThreadPoolSize

      public void setIoThreadPoolSize(Integer ioThreadPoolSize)
      Sets the thread pool size (number of threads to use) for I/O operations (default value is the number of CPUs). The thread pool size is only effective if no ClientResources.Builder.eventLoopGroupProvider(io.lettuce.core.resource.EventLoopGroupProvider) is provided. ClientResources.Builder.ioThreadPoolSize(int)
      Parameters:
      ioThreadPoolSize - the thread pool size, must be greater 0.
    • getComputationThreadPoolSize

      public Integer getComputationThreadPoolSize()
      Returns the pool size (number of threads) for all computation tasks. ClientResources.computationThreadPoolSize()
      Returns:
      the pool size (number of threads to use).
    • setComputationThreadPoolSize

      public void setComputationThreadPoolSize(Integer computationThreadPoolSize)
      Sets the thread pool size (number of threads to use) for computation operations (default value is the number of CPUs). The thread pool size is only effective if no ClientResources.Builder.eventExecutorGroup(io.netty.util.concurrent.EventExecutorGroup) is provided. ClientResources.Builder.computationThreadPoolSize(int)
      Parameters:
      computationThreadPoolSize - the thread pool size, must be greater 0.
    • getName

      public String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Returns:
      Get the name of the bean.
    • setName

      public void setName(String name)
      Sets the name of the bean.
      Parameters:
      name - The name of the bean