Examples of hset()


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

                }
            } else {
                String key = toConsumerPath(url);
                String value = url.toFullString();
                String expire = String.valueOf(System.currentTimeMillis() + expirePeriod);
                jedis.hset(key, value, expire);
                jedis.publish(key, Constants.SUBSCRIBE);
                doNotify(jedis, service, url, listener);
            }
        } finally {
            jedisPool.returnResource(jedis);
View Full Code Here

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

    public void hput(String key, String field, Serializable fieldValue)
            throws Exception {
        Jedis jedis = null;
        try {
            jedis = this.jedisPool.getResource();
            jedis.hset(SafeEncoder.encode(key), SafeEncoder.encode(field),
                    serialize(fieldValue));
            LOG.info("hset key:" + key + " field:" + field);
        } catch (Exception e) {
            LOG.error(e.getMessage(), e);
            this.jedisPool.returnBrokenResource(jedis);
View Full Code Here

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

            continue;
          }
         
          // Yep, this is ugly as hell.
          try {
            jedis.hset(getJedisKey(), field.getName(), redisValue);
          } catch (JedisDataException jde) {
            s_logger.warn("Unable to write stuff yo.");
          }
        }
      } catch (Exception e) {
View Full Code Here

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

            s_logger.warn("Multiple securities with same ExternalId {}. Probable misuse.", externalId);
          }
        }
       
        byte[] redisKey = toRedisKey(uniqueId);
        jedis.hset(redisKey, DATA_NAME_AS_BYTES, securityData);
        jedis.hset(redisKey, CLASS_NAME_AS_BYTES, security.getClass().getName().getBytes(Charsets.UTF_8));
       
        getJedisPool().returnResource(jedis);
      } catch (Exception e) {
        s_logger.error("Unable to put security " + security, e);
View Full Code Here

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

          }
        }
       
        byte[] redisKey = toRedisKey(uniqueId);
        jedis.hset(redisKey, DATA_NAME_AS_BYTES, securityData);
        jedis.hset(redisKey, CLASS_NAME_AS_BYTES, security.getClass().getName().getBytes(Charsets.UTF_8));
       
        getJedisPool().returnResource(jedis);
      } catch (Exception e) {
        s_logger.error("Unable to put security " + security, e);
        getJedisPool().returnBrokenResource(jedis);
View Full Code Here

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

   
    Jedis jedis = getJedisPool().getResource();
    try {
      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
     
      getJedisPool().returnResource(jedis);
View Full Code Here

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

    Jedis jedis = getJedisPool().getResource();
    try {
      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
     
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
View Full Code Here

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

    try {
      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
     
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
      s_logger.warn("Unable to persist to Redis - " + clazz + " - " + configName, e);
View Full Code Here

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

      jedis.sadd(_allClassesKey, clazz.getName());
      jedis.sadd(classKeyName, configName);
      jedis.hset(classNameRedisKey, "UniqueId", uniqueId.toString());
      jedis.hset(uniqueIdKey, DATA_NAME_AS_BYTES, objectAsBytes);
      jedis.hset(uniqueIdKey, CLASS_NAME_AS_BYTES, clazz.getName().getBytes(Charsets.UTF_8));
      jedis.hset(uniqueIdKey, ITEM_NAME_AS_BYTES, configName.getBytes(Charsets.UTF_8));
     
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
      s_logger.warn("Unable to persist to Redis - " + clazz + " - " + configName, e);
      getJedisPool().returnBrokenResource(jedis);
View Full Code Here

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

     
      Jedis jedis = getJedisPool().getResource();
      try {
       
        String redisKey = toPositionRedisKey(position.getUniqueId());
        jedis.hset(redisKey, "QTY", position.getQuantity().toPlainString());
       
        getJedisPool().returnResource(jedis);
      } catch (Exception e) {
        s_logger.error("Unable to store position " + position, e);
        getJedisPool().returnBrokenResource(jedis);
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.