Package redis.clients.jedis

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


  }
 
  public void removeMeeting(String meetingId){
    Jedis jedis = redisPool.getResource();
    try {
      jedis.del("meeting-" + meetingId);
      jedis.srem("meetings", meetingId);
    } finally {
      redisPool.returnResource(jedis);
    }
  }
View Full Code Here


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

        final Jedis jedis = jedisPool.getResource();
        try {
            for (String channelId : getChannelIds(uaid)) {
                removeChannel(channelId);
            }
            jedis.del(uaidLookupKey(uaid));
        } finally {
            jedisPool.returnResource(jedis);
        }
    }
View Full Code Here

    @Override
    public Set<Ack> removeAcknowledged(final String uaid, final Set<Ack> acks) {
        final Jedis jedis = jedisPool.getResource();
        try {
            for (Ack ack : acks) {
                jedis.del(ackLookupKey(ack.getChannelId()));
                jedis.srem(acksLookupKey(uaid), ack.getChannelId());
            }
            return getUnacknowledged(uaid);
        } finally {
            jedisPool.returnResource(jedis);
View Full Code Here

  public void removeData(String sessionId, int pageId)
  {
    Jedis resource = jedisPool.getResource();
    try {
      byte[] key = makeKey(sessionId, pageId);
      resource.del(key);
    } finally {
      jedisPool.returnResource(resource);
    }

    LOGGER.debug("Deleted data for session '{}' and page with id '{}'", sessionId, pageId);
View Full Code Here

    Jedis resource = jedisPool.getResource();
    try {
      byte[] glob = makeGlob(sessionId);
      Set<byte[]> keys = resource.keys(glob);
      for (byte[] key : keys) {
        resource.del(key);
      }
    } finally {
      jedisPool.returnResource(resource);
    }
    LOGGER.debug("Deleted data for session '{}'", sessionId);
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.srem(classKeyName, configName);
      String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
      if (uniqueIdText != null) {
        UniqueId uniqueId = UniqueId.parse(uniqueIdText);
        byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
        jedis.del(uniqueIdKey);
      }
      jedis.del(classNameRedisKey);
     
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
View Full Code Here

      if (uniqueIdText != null) {
        UniqueId uniqueId = UniqueId.parse(uniqueIdText);
        byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
        jedis.del(uniqueIdKey);
      }
      jedis.del(classNameRedisKey);
     
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
      s_logger.warn("Unable to delete from Redis - " + clazz + " - " + configName, e);
      getJedisPool().returnBrokenResource(jedis);
View Full Code Here

          security = SecurityFudgeUtil.convertFromFudge(getFudgeContext(), null, data);
        } catch (Exception e) {
          s_logger.error("Unserializable data in Redis for uniqueId " + uniqueId + ". Clearing redis.", e);
          try {
            _lock.writeLock().lock();
            jedis.del(redisKey);
          } finally {
            _lock.writeLock().unlock();
          }
        }
       
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.