Package redis.clients.jedis

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


      Jedis jedis = getJedisPool().getResource();
      try {
        String uniqueRedisKey = toRedisKey(uniqueId);
        String daysKey = uniqueRedisKey + "-DAYS";
        jedis.del(uniqueRedisKey, daysKey);
        jedis.hset(uniqueRedisKey, TYPE, holiday.getType().toString());
        if (holiday.getCurrency() != null) {
          jedis.hset(uniqueRedisKey, CURRENCY, holiday.getCurrency().getCode());
          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
View Full Code Here


        String uniqueRedisKey = toRedisKey(uniqueId);
        String daysKey = uniqueRedisKey + "-DAYS";
        jedis.del(uniqueRedisKey, daysKey);
        jedis.hset(uniqueRedisKey, TYPE, holiday.getType().toString());
        if (holiday.getCurrency() != null) {
          jedis.hset(uniqueRedisKey, CURRENCY, holiday.getCurrency().getCode());
          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
View Full Code Here

        String daysKey = uniqueRedisKey + "-DAYS";
        jedis.del(uniqueRedisKey, daysKey);
        jedis.hset(uniqueRedisKey, TYPE, holiday.getType().toString());
        if (holiday.getCurrency() != null) {
          jedis.hset(uniqueRedisKey, CURRENCY, holiday.getCurrency().getCode());
          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
View Full Code Here

        if (holiday.getCurrency() != null) {
          jedis.hset(uniqueRedisKey, CURRENCY, holiday.getCurrency().getCode());
          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
View Full Code Here

          jedis.hset(uniqueRedisKey, CURRENCY, holiday.getCurrency().getCode());
          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, EXCHANGE, holiday.getExchangeExternalId().getValue());
View Full Code Here

          jedis.hset(toRedisKey(holiday.getCurrency()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getRegionExternalId() != null) {
          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, EXCHANGE, holiday.getExchangeExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getExchangeExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
View Full Code Here

          jedis.hset(uniqueRedisKey, REGION_SCHEME, holiday.getRegionExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, EXCHANGE, holiday.getExchangeExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getExchangeExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
       
        for (LocalDate holidayDate : holiday.getHolidayDates()) {
View Full Code Here

          jedis.hset(uniqueRedisKey, REGION, holiday.getRegionExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, EXCHANGE, holiday.getExchangeExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getExchangeExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
       
        for (LocalDate holidayDate : holiday.getHolidayDates()) {
          jedis.zadd(daysKey, LocalDateToIntConverter.convertToInt(holidayDate), holidayDate.toString());
View Full Code Here

          jedis.hset(toRedisKey(holiday.getRegionExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
        if (holiday.getExchangeExternalId() != null) {
          jedis.hset(uniqueRedisKey, EXCHANGE_SCHEME, holiday.getExchangeExternalId().getScheme().getName());
          jedis.hset(uniqueRedisKey, EXCHANGE, holiday.getExchangeExternalId().getValue());
          jedis.hset(toRedisKey(holiday.getExchangeExternalId(), holiday.getType()), UNIQUE_ID, uniqueId.toString());
        }
       
        for (LocalDate holidayDate : holiday.getHolidayDates()) {
          jedis.zadd(daysKey, LocalDateToIntConverter.convertToInt(holidayDate), holidayDate.toString());
        }
View Full Code Here

            try {
                Jedis jedis = jedisPool.getResource();
                try {
                    for (String provider : new HashSet<String>(getRegistered())) {
                        String key = toProviderPath(URL.valueOf(provider));
                        if (jedis.hset(key, provider, String.valueOf(System.currentTimeMillis() + expirePeriod)) == 0) {
                            jedis.publish(key, Constants.REGISTER);
                        }
                    }
                    for (String consumer : new HashSet<String>(getSubscribed().keySet())) {
                        URL url = URL.valueOf(consumer);
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.