Package org.jredis

Examples of org.jredis.JRedis.ping()


  }

  private void run(String password) {
    try {
      JRedis  jredis = new JRedisClient("localhost", 6379, "jredis", 0);
      jredis.ping();
     
      if(!jredis.exists(key)) {
        jredis.set(key, "Hello Again!");
        System.out.format("Hello!  You should run me again!\n");
      }
View Full Code Here


  private void run(String password) {
    try {
      ConnectionSpec spec = DefaultConnectionSpec.newSpec().setCredentials(password);
      JRedis  jredis = new JRedisClient(spec);
      jredis.ping();
     
      if(!jredis.exists(bkey)) {
        jredis.set(bkey, "Hello Again!");
        System.out.format("Hello!  You should run me again!\n");
      }
View Full Code Here

  @Test
  public void testGetResource() throws RedisException {
    this.pool = new JredisPool(connectionSpec);
    JRedis client = pool.getResource();
    assertNotNull(client);
    client.ping();
  }

  @Test
  public void testGetResourcePoolExhausted() {
    GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.