您当前的位置: 首页 >  qq_34412985 redis

jedisclient从2.9升级到3.2后redisUtil工具类方法变化

qq_34412985 发布时间:2020-04-17 14:18:49 ,浏览量:5

public Long linsert(String key, BinaryClient.LIST_POSITION where,
                        String pivot, String value) {
        Jedis jedis = getJedis();
        Long linsert = jedis.linsert(key, where, pivot, value);
        close(jedis);
        return linsert;
    }

    /**
     * 通过key在list指定的位置之前或者之后 添加字符串元素
     *
     * @param key
     * @param where LIST_POSITION枚举类型
     * @param pivot list里面的value
     * @param value 添加的value
     * @return
     */
    public Long linsert(String key, ListPosition where,
                        String pivot, String value) {
        Jedis jedis = getJedis();
        Long linsert = jedis.linsert(key, where, pivot, value);
        close(jedis);
        return linsert;
    }

关注
打赏
查看更多评论

qq_34412985

暂无认证

  • 5浏览

    0关注

    957博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录