Examples of hget()


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

    Jedis jedis = getJedisPool().getResource();
    try {
     
      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);
      }
View Full Code Here

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

     
      Set<String> itemNames = jedis.smembers(classKeyName);
     
      for (String itemName : itemNames) {
        String classNameRedisKey = getClassNameRedisKey(clazz, itemName);
        String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
        if (uniqueIdText != null) {
          UniqueId uniqueId = UniqueId.parse(uniqueIdText);
          byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
          byte[] dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
          R config = convertBytesToConfigurationObject(clazz, dataAsBytes);
View Full Code Here

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

        String classNameRedisKey = getClassNameRedisKey(clazz, itemName);
        String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
        if (uniqueIdText != null) {
          UniqueId uniqueId = UniqueId.parse(uniqueIdText);
          byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
          byte[] dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
          R config = convertBytesToConfigurationObject(clazz, dataAsBytes);
          ConfigItem<R> configItem = ConfigItem.of(config);
          configItem.setName(itemName);
          configItem.setType(clazz);
          configItem.setUniqueId(uniqueId);
View Full Code Here

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

    UniqueId uniqueId = null;
   
    Jedis jedis = getJedisPool().getResource();
    try {
      if (jedis.sismember(classKeyName, configName)) {
        String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
        if (uniqueIdText != null) {
          uniqueId = UniqueId.parse(uniqueIdText);
          byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
          dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
        }
View Full Code Here

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

      if (jedis.sismember(classKeyName, configName)) {
        String uniqueIdText = jedis.hget(classNameRedisKey, "UniqueId");
        if (uniqueIdText != null) {
          uniqueId = UniqueId.parse(uniqueIdText);
          byte[] uniqueIdKey = getUniqueIdKey(uniqueId);
          dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
        }
      } else {
        s_logger.debug("No config named {} for class {}", configName, clazz);
      }
     
View Full Code Here

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

    byte[] dataAsBytes = null;
    String className = null;
   
    Jedis jedis = getJedisPool().getResource();
    try {
      dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
      className = new String(jedis.hget(uniqueIdKey, CLASS_NAME_AS_BYTES), Charsets.UTF_8);
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
      s_logger.warn("Unable to lookup by unique id - " + uniqueId, e);
      getJedisPool().returnBrokenResource(jedis);
View Full Code Here

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

    String className = null;
   
    Jedis jedis = getJedisPool().getResource();
    try {
      dataAsBytes = jedis.hget(uniqueIdKey, DATA_NAME_AS_BYTES);
      className = new String(jedis.hget(uniqueIdKey, CLASS_NAME_AS_BYTES), Charsets.UTF_8);
      getJedisPool().returnResource(jedis);
    } catch (Exception e) {
      s_logger.warn("Unable to lookup by unique id - " + uniqueId, e);
      getJedisPool().returnBrokenResource(jedis);
      throw new OpenGammaRuntimeException("Unable to lookup by unique id - " + uniqueId, e);
View Full Code Here

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

    try (Timer.Context context = _getPortfolioTimer.time()) {
     
      Jedis jedis = getJedisPool().getResource();
      try {
        String nameKey = toPortfolioNameRedisKey(portfolioName);
        String uniqueIdString = jedis.hget(nameKey, "UNIQUE_ID");
       
        if (uniqueIdString != null) {
          UniqueId uniqueId = UniqueId.parse(uniqueIdString);
          portfolio = getPortfolioWithJedis(jedis, uniqueId);
        }
View Full Code Here

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

    try (Timer.Context context = _isHolidayTimer.time()) {
      Jedis jedis = getJedisPool().getResource();
      try {
       
        String currencyIdKey = toRedisKey(currency);
        String uniqueId = jedis.hget(currencyIdKey, UNIQUE_ID);
        if (uniqueId != null) {
          String daysKey = toRedisKey(UniqueId.parse(uniqueId)) + "-DAYS";
          if (jedis.zscore(daysKey, dateToCheck.toString()) != null) {
            result = true;
          }
View Full Code Here

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

   
    try (Timer.Context context = _isHolidayTimer.time()) {
      Jedis jedis = getJedisPool().getResource();
      try {
        for (ExternalId externalId : regionOrExchangeIds) {
          String uniqueIdText = jedis.hget(toRedisKey(externalId, holidayType), UNIQUE_ID);
          if (uniqueIdText == null) {
            continue;
          }
          UniqueId uniqueId = UniqueId.parse(uniqueIdText);
          String uniqueIdKey = toRedisKey(uniqueId);
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.