当前位置: 首页 > news >正文

清河网站建设设计自己做网站开发如何找客户

清河网站建设设计,自己做网站开发如何找客户,什么是新媒体营销,浏览器打开app​ 基础配置介绍已经在前面的《RedisTemplate常用集合使用说明(一)》中已经介绍了#xff0c;现在我们直接介绍opsForList()方法的使用#xff1a; 1、leftPush(K key, V value) 在变量左边添加元素值。 redisTemplate.opsForList().leftPush(list,a现在我们直接介绍opsForList()方法的使用 1、leftPush(K key, V value) 在变量左边添加元素值。 redisTemplate.opsForList().leftPush(list,a); redisTemplate.opsForList().leftPush(list,b); redisTemplate.opsForList().leftPush(list,c);2、index(K key, long index) 获取集合指定位置的值。 String listValue redisTemplate.opsForList().index(list,1) ; System.out.println(通过index(K key, long index)方法获取指定位置的值: listValue);3、range(K key, long start, long end) 获取指定区间的值。 ListObject list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过range(K key, long start, long end)方法获取指定范围的集合值:list);4、leftPush(K key, V pivot, V value) 把最后一个参数值放到指定集合的第一个出现中间参数的前面如果中间参数值存在的话。 redisTemplate.opsForList().leftPush(list,a,n); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过leftPush(K key, V pivot, V value)方法把值放到指定参数值前面: list);5、leftPushAll(K key, V… values) 向左边批量添加参数元素。 redisTemplate.opsForList().leftPushAll(list,w,x,y); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过leftPushAll(K key, V... values)方法批量添加元素: list);6、leftPushAll(K key, Collection values) 以集合的方式向左边批量添加元素。 List newList new ArrayList(); newList.add(o); newList.add(p); newList.add(q); redisTemplate.opsForList().leftPushAll(list,newList); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过leftPushAll(K key, CollectionV values)方法以集合的方式批量添加元素: list);7、leftPushIfPresent(K key, V value) 如果存在集合则添加元素。 redisTemplate.opsForList().leftPushIfPresent(presentList,o); list redisTemplate.opsForList().range(presentList,0,-1); System.out.println(通过leftPushIfPresent(K key, V value)方法向已存在的集合添加元素: list);8、rightPush(K key, V value) 向集合最右边添加元素。 redisTemplate.opsForList().rightPush(list,w); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过rightPush(K key, V value)方法向最右边添加元素: list);9、rightPush(K key, V pivot, V value) 向集合中第一次出现第二个参数变量元素的右边添加第三个参数变量的元素值。 redisTemplate.opsForList().rightPush(list,w,r); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过rightPush(K key, V pivot, V value)方法向最右边添加元素: list); 10、rightPushAll(K key, V… values) 向右边批量添加元素。 redisTemplate.opsForList().rightPushAll(list,j,k); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过rightPushAll(K key, V... values)方法向最右边批量添加元素: list); 11、rightPushAll(K key, Collection values) 以集合方式向右边添加元素。 newList.clear(); newList.add(g); newList.add(h); redisTemplate.opsForList().rightPushAll(list,newList); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过rightPushAll(K key, CollectionV values)方法向最右边以集合方式批量添加元素: list);12、rightPushIfPresent(K key, V value) 向已存在的集合中添加元素。 redisTemplate.opsForList().rightPushIfPresent(presentList,d); list redisTemplate.opsForList().range(presentList,0,-1); System.out.println(通过rightPushIfPresent(K key, V value)方法已存在的集合向最右边添加元素: list); 13、size(K key) 获取集合长度。 long listLength redisTemplate.opsForList().size(list); System.out.println(通过size(K key)方法获取集合list的长度为: listLength); 14、leftPop(K key) ​ 移除集合中的左边第一个元素。 Object popValue redisTemplate.opsForList().leftPop(list); System.out.print(通过leftPop(K key)方法移除的元素是: popValue); list redisTemplate.opsForList().range(list,0,-1); System.out.println(,剩余的元素是: list); 15、leftPop(K key, long timeout, TimeUnit unit) 移除集合中左边的元素在等待的时间里如果超过等待的时间仍没有元素则退出。 popValue redisTemplate.opsForList().leftPop(presentList,1, TimeUnit.SECONDS); System.out.print(通过leftPop(K key, long timeout, TimeUnit unit)方法移除的元素是: popValue); list redisTemplate.opsForList().range(presentList,0,-1); System.out.println(,剩余的元素是: list);16、rightPop(K key) ​ 移除集合中右边的元素。 ​ popValue redisTemplate.opsForList().rightPop(list); System.out.print(通过rightPop(K key)方法移除的元素是: popValue); list redisTemplate.opsForList().range(list,0,-1); System.out.println(,剩余的元素是: list); 17、rightPop(K key, long timeout, TimeUnit unit) 移除集合中右边的元素在等待的时间里如果超过等待的时间仍没有元素则退出。 popValue redisTemplate.opsForList().rightPop(presentList,1, TimeUnit.SECONDS); System.out.print(通过rightPop(K key, long timeout, TimeUnit unit)方法移除的元素是: popValue); list redisTemplate.opsForList().range(presentList,0,-1); System.out.println(,剩余的元素是: list); 18、rightPopAndLeftPush(K sourceKey, K destinationKey) 移除集合中右边的元素同时在左边加入一个元素。 popValue redisTemplate.opsForList().rightPopAndLeftPush(list,12); System.out.print(通过rightPopAndLeftPush(K sourceKey, K destinationKey)方法移除的元素是: popValue); list redisTemplate.opsForList().range(list,0,-1); System.out.println(,剩余的元素是: list); 19、rightPopAndLeftPush(K sourceKey, K destinationKey, long timeout, TimeUnit unit) 移除集合中右边的元素在等待的时间里同时在左边添加元素如果超过等待的时间仍没有元素则退出。 popValue redisTemplate.opsForList().rightPopAndLeftPush(presentList,13,1,TimeUnit.SECONDS); System.out.println(通过rightPopAndLeftPush(K sourceKey, K destinationKey, long timeout, TimeUnit unit)方法移除的元素是: popValue); list redisTemplate.opsForList().range(presentList,0,-1); System.out.print(,剩余的元素是: list); 20、set(K key, long index, V value) *在集合的指定位置插入元素*,如果指定位置已有元素则覆盖没有则新增超过集合下标*n*则会报错。 redisTemplate.opsForList().set(presentList,3,15); list redisTemplate.opsForList().range(presentList,0,-1); System.out.print(通过set(K key, long index, V value)方法在指定位置添加元素后: list); 21*、remove(K key, long count, Object value) 从存储在键中的列表中删除等于值的元素的第一个计数事件。count 0删除等于从左到右移动的值的第一个元素count 0删除等于从右到左移动的值的第一个元素count 0删除等于value的所有元素。 long removeCount redisTemplate.opsForList().remove(list,0,w); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过remove(K key, long count, Object value)方法移除元素数量: removeCount); System.out.println(,剩余的元素: list);22、trim(K key, long start, long end) 截取集合元素长度保留长度内的数据。 redisTemplate.opsForList().trim(list,0,5); list redisTemplate.opsForList().range(list,0,-1); System.out.println(通过trim(K key, long start, long end)方法截取后剩余元素: list);
http://wiki.neutronadmin.com/news/9561/

相关文章:

  • 什么做网站统计好软件设计工具有哪些
  • 卖东西专业网站网上网站风格设定
  • 网站解析设置二室一厅60平米装修案例
  • 新开传奇网站发布站三端互通注册公司要钱吗
  • 内网做网站怎么查网站备案号
  • 局域网的电脑怎么做网站服务器怎样修改静态公司网站页面电话
  • 如何进行网站的建设和维护建设银行武威分行网站
  • _沈阳做网站怎样做服装厂的企业网站模版
  • 烟台网站建设多少钱解读网站建设
  • 建设网站构成关键字搜索网站怎么做
  • 网站开发具体工作有那些网页设计图片是怎么显示的
  • 乔拓云智能建站wordpress js代码插件下载地址
  • 网站icon怎么设置能上国外网站的dns
  • 珠海网站公司哪家好东莞网站建设曼哈顿信科
  • 网站后台管理教程下载软件的app大全
  • 做外贸有必要做个网站吗潍坊免费自助建站模板
  • 建立网站c 如何做公司网站
  • 企业网站建设计划表个人网页首页
  • 加强教育信息网站建设广告安装接单app
  • 怎么用自己的网站做链轮向雅虎提交网站
  • 网站 加域名网站如何做网站名称
  • 晋城网站建设电话低代码app开发平台
  • 劳务派遣技术支持 东莞网站建设企业怎么做网络销售
  • 车网站模板预览做网站用什么服务器
  • 海口哪里做网站seo下拉优化
  • 鹏鸿生态板官方网站开发区代理如何在自己做的网站中顶置内容
  • 东莞网站优化宁德城乡建设部网站首页
  • 如何获取所有网站青岛做网站的费用
  • 建设常规的网站报价是多少万博法务网站
  • 威海市网站建设模板手机网站建设公司