Package redis.clients.jedis

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


        return zrange;
    }

    public Long zadd(float score, String member) {
        Jedis jedis = getResource();
        Long zadd = jedis.zadd(key(), score, member);
        returnResource(jedis);
        return zadd;
    }

    public Long zcard() {
View Full Code Here


    }

    @Test
    public void testIsDelayedQueue_Success() {
        final Jedis jedis = createJedis(CONFIG);
        jedis.zadd(TEST_KEY, 1.0, "bar");
        Assert.assertTrue(JedisUtils.isDelayedQueue(jedis, TEST_KEY));
    }

    @Test
    public void testIsDelayedQueue_Failure() {
View Full Code Here

    }

    @Test
    public void testCanUseAsDelayedQueue_Success_ZSet() {
        final Jedis jedis = createJedis(CONFIG);
        jedis.zadd(TEST_KEY, 1.0, "bar");
        Assert.assertTrue(JedisUtils.canUseAsDelayedQueue(jedis, TEST_KEY));
    }

    @Test
    public void testCanUseAsDelayedQueue_Success_None() {
View Full Code Here

          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());
        }
        getJedisPool().returnResource(jedis);
      } catch (Exception e) {
        s_logger.error("Unable to add holiday " + holiday, 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.