Examples of sismember()


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

    @Override
    public boolean isDuplicate(Request request, Task task) {
        Jedis jedis = pool.getResource();
        try {
            boolean isDuplicate = jedis.sismember(getSetKey(task), request.getUrl());
            if (!isDuplicate) {
                jedis.sadd(getSetKey(task), request.getUrl());
            }
            return isDuplicate;
        } finally {
View Full Code Here

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

    public boolean saveChannel(final Channel channel) {
        final Jedis jedis = jedisPool.getResource();
        try {
            final String uaid = channel.getUAID();
            final String chid = channel.getChannelId();
            if (jedis.sismember(uaidLookupKey(uaid), chid)) {
                return false;
            }
            final String endpointToken = channel.getEndpointToken();
            final Transaction tx = jedis.multi();
            tx.set(endpointToken, Long.toString(channel.getVersion()));
View Full Code Here

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

    byte[] dataAsBytes = null;
    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
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.