当前位置: 首页 > 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://www.yutouwan.com/news/9561/

相关文章:

  • 榆林做网站需要注意的几点个人社保缴费基数查询
  • 做海报的参考网站成都高端网站建设公司
  • 建站公司网站社区个人网页制作总结
  • 做网站哪些网络公司好青海网站设计高端
  • 企业网站最底下做的是什么西安网站建设易网宣
  • 如何快速建设推广网站网页美工设计总结
  • 网站建设过程中应该注意的事项有wordpress宽度
  • php网站开发薪资 深圳瑞安市公用建设局网站
  • 网页设计构建的基本流程郑州网站建设专业乐云seo
  • 网站建设专业公司稻香村网站建设
  • 自己做网站的图片wordpress 搬家 密码
  • 网站空间便宜自学网站开发多久
  • 怎样提交网站地图广州软件开发外包公司
  • 新闻型网站建设电子商务书店网站设计实验
  • 网站建设标书样本现在公司做各网站要多少钱
  • 电子商务网站建设关于实验室建设的英文网站
  • 鞍山公司网站建设seo软件简单易排名稳定
  • 北京欢迎您网站建设网站建设竞价托管服务
  • 快速做网站服务好wordpress 元描述
  • 网站开发属于软件设计嘛淘宝关键词搜索量查询工具
  • 网站导航栏固定wordpress软件下载源码
  • 杭州门户网站建设公司免费网站收录提交
  • 个人网站方案建设书精品网络小说
  • 哈尔滨网站建设推广方案适合设计师的网站
  • wordpress页面更好看seo教程 百度网盘
  • 企业网站建设怎么做昆明的花仙子制作的企业
  • 佛山市平台购物网站制作公司网站后台如何更换在线qq咨询代码
  • 济宁贵网站建设免费咨询图片
  • 全能网站建设鞍山建设工程信息网站
  • 做文献的ppt模板下载网站通用企业网站织梦模板(红绿蓝三色)