Package redis.clients.jedis

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


    }

    public void del(String key) {
        Jedis jedis = borrow();
        try {
            jedis.del(key);
        } finally {
            revert(jedis);
        }
    }
View Full Code Here


    public void sClear(String key, String oldKey) {
        Jedis jedis = borrow();
        try {
            Set<String> oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.del(oldKey + ":" + str);
            }
            jedis.del(key);
        } finally {
            revert(jedis);
        }
View Full Code Here

        try {
            Set<String> oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.del(oldKey + ":" + str);
            }
            jedis.del(key);
        } finally {
            revert(jedis);
        }
    }
View Full Code Here

        return multi;
    }

    public Long del() {
        Jedis jedis = getResource();
        Long del = jedis.del(key());
        returnResource(jedis);
        return del;
    }

    public Boolean exists() {
View Full Code Here

    log.trace("Removing session ID : " + session.getId());

    try {
      jedis = acquireConnection();
      jedis.del(session.getId());
      error = false;
    } finally {
      if (jedis != null) {
        returnConnection(jedis, error);
      }
View Full Code Here

     */
    public boolean delete(String key) {
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            jedis.del(SafeEncoder.encode(key));
            LOG.info("delete key:" + key);

            return true;
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
View Full Code Here

      Jedis jedis = new Jedis(redisConfig);
      Set<String> keys = jedis.keys("url#*");
      for (String oldkey : keys) {
         String url = jedis.get(oldkey);
         newUrl(url, jedis);
         jedis.del(oldkey);
      }
      renderText("OK");
   }

   public static Integer count() {
View Full Code Here

      Set<String> keys = jedis.keys("fromkey:*");
      List<String> deletedKeys = new ArrayList<String>();
      for (String key : keys) {
         if (!isValidUrl(jedis.get(key)) || !isReachableUrl(jedis.get(key))) {
            deletedKeys.add(jedis.get(key));
            jedis.del("count:" + jedis.get("fromurl:" + jedis.get(key)));
            jedis.del("fromurl:" + jedis.get(key));
            jedis.del(key);
         }
      }
      keys = jedis.keys("fromurl:*");
 
View Full Code Here

      List<String> deletedKeys = new ArrayList<String>();
      for (String key : keys) {
         if (!isValidUrl(jedis.get(key)) || !isReachableUrl(jedis.get(key))) {
            deletedKeys.add(jedis.get(key));
            jedis.del("count:" + jedis.get("fromurl:" + jedis.get(key)));
            jedis.del("fromurl:" + jedis.get(key));
            jedis.del(key);
         }
      }
      keys = jedis.keys("fromurl:*");
      for (String key : keys) {
View Full Code Here

      for (String key : keys) {
         if (!isValidUrl(jedis.get(key)) || !isReachableUrl(jedis.get(key))) {
            deletedKeys.add(jedis.get(key));
            jedis.del("count:" + jedis.get("fromurl:" + jedis.get(key)));
            jedis.del("fromurl:" + jedis.get(key));
            jedis.del(key);
         }
      }
      keys = jedis.keys("fromurl:*");
      for (String key : keys) {
         String urlKey = jedis.get(key);
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.