Package redis.clients.jedis

Examples of redis.clients.jedis.Jedis.disconnect()


    }
   
    @Test
    public void testTestJedisConnection_Fail() {
        final Jedis jedis = createJedis(CONFIG);
        jedis.disconnect();
        Assert.assertFalse(JedisUtils.testJedisConnection(jedis));
    }
   
    @Test
    public void testReconnect_Success() {
View Full Code Here


      return false;
    }
    finally {
      if (jedis != null) {
        try {
          jedis.disconnect();
          jedis.close();
        }
        catch (Exception ex) {
          // Continue
        }
View Full Code Here

        if (password != null)
        {
            jedis.auth(password);
        }
        jedis.flushDB();
        jedis.disconnect();
    }

    /**
     * Start Redis server.
     *
 
View Full Code Here

    } finally {

      if (jedis != null) {
        try {

          jedis.disconnect();
          jedis.close();
        } catch (Exception e) {

          e.printStackTrace();
        }
View Full Code Here

      return temp.ping().equalsIgnoreCase("pong");
    } catch (Exception e) {
      return false;
    } finally {
      if (temp != null) {
        temp.disconnect();
        temp.close();
      }
    }
  }
View Full Code Here

    public static void main(String[] args) throws IOException {
        Jedis jedis = new Jedis("localhost");
        jedis.flushAll();
        jedis.quit();
        jedis.disconnect();

        List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
        shards.add(new JedisShardInfo("localhost"));
        Config config = new Config();
        Seek.configure(config, shards);
View Full Code Here

            seek.remove(String.valueOf(n), "84689862");
        }
        long elapsed = System.nanoTime() - start;

        jedis.quit();
        jedis.disconnect();

        System.out.println(((1000 * SEARCHES) / (elapsed / 1000000))
                + " indexaciones por segundo");
    }

View Full Code Here

    public static void main(String[] args) throws IOException {
        Jedis jedis = new Jedis("localhost");
        jedis.flushAll();
        jedis.quit();
        jedis.disconnect();

        List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
        shards.add(new JedisShardInfo("localhost"));
        Config config = new Config();
        Seek.configure(config, shards);
View Full Code Here

            entry.save();
        }
        long elapsed = System.nanoTime() - start;

        jedis.quit();
        jedis.disconnect();

        System.out.println(((1000 * SEARCHES) / (elapsed / 1000000))
                + " indexaciones por segundo");
    }

View Full Code Here

          jedis.get(key);
        }
       
        completionCounter.countDown();
       
        jedis.disconnect();
      }
    }, "CacheClient-"+clientCounter.incrementAndGet()).start();
  }
 
  private String generateCacheKey() {
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.