Examples of del()


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

      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

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

      keys = jedis.keys("fromurl:*");
      for (String key : keys) {
         String urlKey = jedis.get(key);
         if (jedis.keys("fromkey:" + urlKey).isEmpty()) {
            deletedKeys.add(key);
            jedis.del("count:" + urlKey);
            jedis.del("fromkey:" + urlKey);
            jedis.del(key);
         }
      }
      renderJSON(deletedKeys);
View Full Code Here

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

      for (String key : keys) {
         String urlKey = jedis.get(key);
         if (jedis.keys("fromkey:" + urlKey).isEmpty()) {
            deletedKeys.add(key);
            jedis.del("count:" + urlKey);
            jedis.del("fromkey:" + urlKey);
            jedis.del(key);
         }
      }
      renderJSON(deletedKeys);
   }
View Full Code Here

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

         String urlKey = jedis.get(key);
         if (jedis.keys("fromkey:" + urlKey).isEmpty()) {
            deletedKeys.add(key);
            jedis.del("count:" + urlKey);
            jedis.del("fromkey:" + urlKey);
            jedis.del(key);
         }
      }
      renderJSON(deletedKeys);
   }
View Full Code Here

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

                    String jsonState = jedis.get( ref.identity() );
                    if( notFound( jsonState ) )
                    {
                        throw new EntityNotFoundException( ref );
                    }
                    jedis.del( ref.identity() );
                }
            } );
        }
        finally
        {
View Full Code Here

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

    @Override
    public void resetDuplicateCheck(Task task) {
        Jedis jedis = pool.getResource();
        try {
            jedis.del(getSetKey(task));
        } finally {
            pool.returnResource(jedis);
        }
    }
View Full Code Here

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

    public static void cleanDB() {
        Jedis jedis = emometer.EmoMeter.getPool().getResource();
        try {
            int id = Integer.parseInt(jedis.get("ids:emotion"));
            for (int i = 1; i <= id; i++) {
                jedis.del("emotion:"+i);
            }
            jedis.del("ids:emotion");
        } catch (Exception e) {
            e.printStackTrace();
        }finally{
View Full Code Here

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

        try {
            int id = Integer.parseInt(jedis.get("ids:emotion"));
            for (int i = 1; i <= id; i++) {
                jedis.del("emotion:"+i);
            }
            jedis.del("ids:emotion");
        } catch (Exception e) {
            e.printStackTrace();
        }finally{
            emometer.EmoMeter.getPool().returnResource(jedis);
        }
View Full Code Here

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

            for (String key : keys) {
              ks.add(key.getBytes());
            }
          }
          // 清除缓存
          jedis.del(ks.toArray(new byte[0][0]));
        }
      } finally {
        jedisPool.returnResource(jedis);
      }
    }
View Full Code Here

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

                            return new RpcResult();
                        } else if (delete.equals(invocation.getMethodName())) {
                            if (invocation.getArguments().length != 1) {
                                throw new IllegalArgumentException("The redis delete method arguments mismatch, must only one arguments. interface: " + type.getName() + ", method: " + invocation.getMethodName() + ", url: " + url);
                            }
                            resource.del(String.valueOf(invocation.getArguments()[0]).getBytes());
                            return new RpcResult();
                        } else {
                            throw new UnsupportedOperationException("Unsupported method " + invocation.getMethodName() + " in redis service.");
                        }
                    }
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.