io.lettuce.core.ClientOptions Java Examples

The following examples show how to use io.lettuce.core.ClientOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RedisConfig.java    From jeesupport with MIT License 6 votes vote down vote up
@Bean
public LettucePoolingClientConfiguration lettucePoolConfig( ClientOptions _co, ClientResources _cr ){
    GenericObjectPoolConfig gopc = new GenericObjectPoolConfig();

    gopc.setMaxIdle( CommonConfig.getInteger( "spring.redis.pool.max-idle", DEFAULT_MAX_IDLE ) );
    gopc.setMinIdle( CommonConfig.getInteger( "spring.redis.pool.min-idle", DEFAULT_MIN_IDLE ) );
    gopc.setMaxTotal( CommonConfig.getInteger( "spring.redis.pool.max-active", DEFAULT_MAX_TOTAL ) );
    gopc.setMaxWaitMillis( CommonConfig.getLong( "spring.redis.pool.max-wait", DEFAULT_MAX_WAIT_MILLIS ) );
    gopc.setEvictorShutdownTimeoutMillis( CommonConfig.getLong( "spring.redis.pool.timeout",
                                                                DEFAULT_EVICTOR_SHUTDOWN_TIMEOUT_MILLIS ) );

    return LettucePoolingClientConfiguration.builder()
            .poolConfig( gopc )
            .clientOptions( _co )
            .clientResources( _cr )
            .build();
}
 
Example #2
Source File: RedisConfig.java    From jeesupport with MIT License 5 votes vote down vote up
@Bean
public ClientOptions clientOptions(){
    return ClientOptions.builder()
            .disconnectedBehavior( ClientOptions.DisconnectedBehavior.REJECT_COMMANDS )
            .autoReconnect( true )
            .build();
}
 
Example #3
Source File: TracingStatefulRedisConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}
 
Example #4
Source File: TracingStatefulRedisClusterConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}
 
Example #5
Source File: TracingStatefulRedisConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}
 
Example #6
Source File: TracingStatefulRedisClusterConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}
 
Example #7
Source File: TracingStatefulRedisConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}
 
Example #8
Source File: TracingStatefulRedisClusterConnection.java    From java-redis-client with Apache License 2.0 4 votes vote down vote up
@Override
public ClientOptions getOptions() {
  return connection.getOptions();
}