Package com.lambdaworks.redis

Examples of com.lambdaworks.redis.RedisClient


     * @param redisURI
     * @return RedisClient
     */
    @Produces
    public RedisClient create(RedisURI redisURI) {
        return new RedisClient(redisURI);
    }
View Full Code Here


    public RedisClient create(CreationalContext<RedisClient> creationalContext) {

        CreationalContext<RedisURI> uriCreationalContext = beanManager.createCreationalContext(redisURIBean);
        RedisURI redisURI = (RedisURI) beanManager.getReference(redisURIBean, RedisURI.class, uriCreationalContext);

        return new RedisClient(redisURI);
    }
View Full Code Here

        return RedisClient.class;
    }

    @Override
    protected RedisClient createInstance() throws Exception {
        return new RedisClient(getRedisURI());
    }
View Full Code Here

  private RedisClient createRedisClient() {
    if (pool != null) {
      return pool.getClient();
    }
    RedisClient client = password != null ? new AuthenticatingRedisClient(hostName, port, password) : new RedisClient(
        hostName, port);
    client.setDefaultTimeout(timeout, TimeUnit.MILLISECONDS);
    return client;
  }
View Full Code Here

    this.poolConfig = poolConfig;
  }

  @SuppressWarnings({ "rawtypes" })
  public void afterPropertiesSet() {
    this.client = password != null ? new AuthenticatingRedisClient(hostName, port, password) : new RedisClient(
        hostName, port);
    client.setDefaultTimeout(timeout, TimeUnit.MILLISECONDS);
    this.internalPool = new GenericObjectPool<RedisAsyncConnection>(new LettuceFactory(client, dbIndex), poolConfig);
  }
View Full Code Here

    if (client != null) {
      client.shutdown();
    }

    RedisClient badClient = new AuthenticatingRedisClient("localhost", "notthepassword");
    badClient.connect();
  }
View Full Code Here

    @SuppressWarnings({ "unchecked" })
    @Before
    public void setUp() {

      RedisClient clientMock = mock(RedisClient.class);
      when(clientMock.connectAsync((RedisCodec) any())).thenReturn(getNativeRedisConnectionMock());
      connection = new LettuceConnection(0, clientMock);
    }
View Full Code Here

TOP

Related Classes of com.lambdaworks.redis.RedisClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.