Examples of lrem()


Examples of org.jredis.JRedis.lrem()

            keyList = db.keys(RedisIndexKeys.META_AUTO + idxName + ":*");
            for(String key : keyList){
                    db.del(key);
            }

            db.lrem(RedisIndexKeys.META_INDICES_AUTO, idxName, 0);

            keyList = db.keys(RedisIndexKeys.MANUAL + idxName + ":*");
            for(String key : keyList){
                    db.del(key);
            }
View Full Code Here

Examples of org.jredis.JRedis.lrem()

            keyList = db.keys(RedisIndexKeys.META_MANUAL + idxName + ":*");
            for(String key : keyList){
                    db.del(key);
            }

            db.lrem(RedisIndexKeys.META_INDICES_MANUAL, idxName, 0);
        } catch (RedisException e) {
            e.printStackTrace();
        }

        this.manualIndices.remove(idxName);
View Full Code Here

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

        return llen;
    }

    public Long lrem(int count, String value) {
        Jedis jedis = getResource();
        Long lrem = jedis.lrem(key(), count, value);
        returnResource(jedis);
        return lrem;
    }

    public List<String> lrange(int start, int end) {
View Full Code Here

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

            UpdateOperations<PasteItem> updateOp = ds.createUpdateOperations(PasteItem.class).inc("abuseCount", 1);

            PasteItem modifiedPasteItem = ds.findAndModify(query, updateOp);
            if (modifiedPasteItem.getAbuseCount() > 1) {
                System.out.println("Removing paste [" + modifiedPasteItem.getItemId() + "] because of abuseCount:" + modifiedPasteItem.getAbuseCount());
                jedis.lrem("pasteHistory", 1, "" + modifiedPasteItem.getPasteIndex());
            }
        } catch (JedisConnectionException je) {
            if (null != jedis) {
                jedisPool.returnBrokenResource(jedis);
                jedis = null;
View Full Code Here

Examples of redis.clients.jedis.Transaction.lrem()

    }

    public void addUpdateContact(Jedis conn, String user, String contact) {
        String acList = "recent:" + user;
        Transaction trans = conn.multi();
        trans.lrem(acList, 0, contact);
        trans.lpush(acList, contact);
        trans.ltrim(acList, 0, 99);
        trans.exec();
    }
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.