Examples of del()


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

    @Override
    public boolean remove(String key) {
        Jedis jedis = null;
        try {
            jedis = getJedis();
            jedis.del(SerializationUtils.serialize(key));
        } finally {
            returnJedis(jedis);
        }
        return false;
    }
View Full Code Here

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

  public void setLastEntries(Feed feed, List<String> entries) {
    try (Jedis jedis = pool.getResource()) {
      String key = buildRedisEntryKey(feed);

      Pipeline pipe = jedis.pipelined();
      pipe.del(key);
      for (String entry : entries) {
        pipe.sadd(key, entry);
      }
      pipe.expire(key, (int) TimeUnit.DAYS.toSeconds(7));
      pipe.sync();
View Full Code Here

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

            int shard = 0;
           
            try {
                long ts1 = System.currentTimeMillis();
                jedis = redisP.getResource();
                Long clearNum = jedis.del(ralativeUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE);
                logger.debug("num removed=" + clearNum);
                clearNum = jedis.del(ralativeUrl + "-" + shard + "-Q");
                logger.debug("num removed=" + clearNum);
                clearNum = jedis.del(ralativeUrl + "-" + shard + "-F");
                logger.debug("num removed=" + clearNum);
View Full Code Here

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

  jedis.zadd("zset", 1, "foo");
  jedis.sadd("set", "foo");

  ShardedJedisPipeline p = jedis.pipelined();
  Response<String> string = p.get("string");
  Response<Long> del = p.del("string");
  Response<String> emptyString = p.get("string");
  Response<String> list = p.lpop("list");
  Response<String> hash = p.hget("hash", "foo");
  Response<Set<String>> zset = p.zrange("zset", 0, -1);
  Response<String> set = p.spop("set");
View Full Code Here

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

    }

    try {
      // atomically remove ticket
      Transaction t = jedis.multi();
      t.del(key(repository, KeyType.ticket, ticket.number));
      t.del(key(repository, KeyType.journal, ticket.number));
      t.exec();

      success = true;
      log.debug("deleted ticket {} from Redis @ {}", "" + ticket.number, getUrl());
View Full Code Here

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

    try {
      // atomically remove ticket
      Transaction t = jedis.multi();
      t.del(key(repository, KeyType.ticket, ticket.number));
      t.del(key(repository, KeyType.journal, ticket.number));
      t.exec();

      success = true;
      log.debug("deleted ticket {} from Redis @ {}", "" + ticket.number, getUrl());
    } catch (JedisException e) {
View Full Code Here

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

    boolean success = false;
    try {
      Set<String> keys = jedis.keys(repository.name + ":*");
      if (keys.size() > 0) {
        Transaction t = jedis.multi();
        t.del(keys.toArray(new String[keys.size()]));
        t.exec();
      }
      success = true;
    } catch (JedisException e) {
      log.error("failed to delete all tickets in Redis @ " + getUrl(), e);
View Full Code Here

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

    boolean success = false;
    try {
      Set<String> keys = jedis.keys(repository.name + ":*");
      if (keys.size() > 0) {
        Transaction t = jedis.multi();
        t.del(keys.toArray(new String[keys.size()]));
        t.exec();
      }
      success = true;
    } catch (JedisException e) {
      log.error("failed to delete all tickets in Redis @ " + getUrl(), e);
View Full Code Here

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

    }

    try {
      // atomically remove ticket
      Transaction t = jedis.multi();
      t.del(key(repository, KeyType.ticket, ticket.number));
      t.del(key(repository, KeyType.journal, ticket.number));
      t.exec();

      success = true;
      log.debug("deleted ticket {} from Redis @ {}", "" + ticket.number, getUrl());
View Full Code Here

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

    try {
      // atomically remove ticket
      Transaction t = jedis.multi();
      t.del(key(repository, KeyType.ticket, ticket.number));
      t.del(key(repository, KeyType.journal, ticket.number));
      t.exec();

      success = true;
      log.debug("deleted ticket {} from Redis @ {}", "" + ticket.number, getUrl());
    } catch (JedisException e) {
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.