Package redis.clients.jedis

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


    }

    public Set<String> sCopy(String key, String new_key) {
        Jedis jedis = borrow();
        try {
            Set<String> oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.sadd(new_key, str);
            }
            return oldSets;
        } finally {
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 {
View Full Code Here

    }

    public Set<String> sMove(String key, String new_key) {
        Jedis jedis = borrow();
        try {
            Set<String> oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.smove(key, new_key, str);
            }
            return oldSets;
        } finally {
View Full Code Here

        return reply;
    }

    public Set<String> smembers() {
        Jedis jedis = getResource();
        Set<String> members = jedis.smembers(key());
        returnResource(jedis);
        return members;
    }

    // Redis List Operations
View Full Code Here

     
      if (this.db != 0)
        jedis.select(this.db);

      String key = commandParts[1];
      Set<String> members = jedis.smembers(key);
     
      RedisManager.getInstance().returnJedis(this.host + ":" + this.port,
          jedis);

      for (int docid = 0; docid < docValues.length; docid++) {
View Full Code Here

    @Override
    public Set<String> getChannelIds(final String uaid) {
        final Jedis jedis = jedisPool.getResource();
        try {
            return jedis.smembers(uaidLookupKey(uaid));
        } finally {
            jedisPool.returnResource(jedis);
        }
    }
View Full Code Here

    @Override
    public Set<Ack> getUnacknowledged(final String uaid) {
        final Jedis jedis = jedisPool.getResource();
        try {
            final Set<String> unacks = jedis.smembers(acksLookupKey(uaid));
            if (unacks.isEmpty()) {
                return Collections.emptySet();
            }
            final Set<Ack> acks = new HashSet<Ack>(unacks.size());
            for (String channelId : unacks) {
View Full Code Here

  @Override
  public Set<String> getAllIdentifiers(String identifierScheme) {
    initIfNecessary();
    Jedis jedis = _jedisPool.getResource();
    Set<String> allMembers = jedis.smembers(generatePerSchemeKey(identifierScheme));
    _jedisPool.returnResource(jedis);
    s_logger.info("Loaded {} identifiers from Jedis (full contents in Debug level log)", allMembers.size());
    if (s_logger.isDebugEnabled()) {
      s_logger.debug("Loaded identifiers from Jedis: {}", allMembers);
    }
View Full Code Here

    List<ConfigItem<R>> items = new LinkedList<ConfigItem<R>>();
   
    Jedis jedis = getJedisPool().getResource();
    try {
     
      Set<String> itemNames = jedis.smembers(classKeyName);
     
      for (String itemName : itemNames) {
        String classNameRedisKey = getClassNameRedisKey(clazz, itemName);
        String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
        if (uniqueIdText != null) {
View Full Code Here

  }
 
  private Set<String> getAllSchemes() {
    JedisPool jedisPool = _redisConnector.getJedisPool();
    Jedis jedis = jedisPool.getResource();
    Set<String> allMembers = jedis.smembers(generateAllSchemesKey());
    jedisPool.returnResource(jedis);
    s_logger.info("Loaded {} schemes from Jedis (full contents in Debug level log)", allMembers.size());
    if (s_logger.isDebugEnabled()) {
      s_logger.debug("Loaded schemes from Jedis: {}", allMembers);
    }
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.