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

传销网站建设seo是什么意思?

传销网站建设,seo是什么意思?,贺州做网站,wordpress迁移到本地Spring Boot 整合 Redisson 缓存 (官网) 介绍: Redisson是一个在Redis的基础上实现的Java驻内存数据网格(In-Memory Data Grid)。它不仅提供了一系列的分布式的Java常用对象,还提供了许多分布式服务。其中包括(BitSet, Set, Multimap, Sorte…

Spring Boot 整合 Redisson 缓存 (官网)

介绍:

Redisson是一个在Redis的基础上实现的Java驻内存数据网格(In-Memory Data Grid)。它不仅提供了一系列的分布式的Java常用对象,还提供了许多分布式服务。其中包括(BitSet, Set, Multimap, SortedSet, Map, List, Queue, BlockingQueue, Deque, BlockingDeque, Semaphore, Lock, AtomicLong, CountDownLatch, Publish / Subscribe, Bloom filter, Remote service, Spring cache, Executor service, Live Object service, Scheduler service) Redisson提供了使用Redis的最简单和最便捷的方法。Redisson的宗旨是促进使用者对Redis的关注分离(Separation of Concern),从而让使用者能够将精力更集中地放在处理业务逻辑上。

如果你现在正在使用其他的Redis的Java客户端,那么Redis命令和Redisson对象匹配列表 能够帮助你轻松的将现有代码迁徙到Redisson框架里来。

Redisson底层采用的是Netty 框架。支持Redis 2.8以上版本,支持Java1.6+以上版本。

例子Boot版本:

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>

1.0 依赖

Integrates Redisson with Spring Boot library. Depends on Spring Data Redis module.

将Redisson与Spring Boot库集成。取决于Spring Data Redis模块。

<dependency><groupId>org.redisson</groupId><artifactId>redisson-spring-boot-starter</artifactId><version>2.15.2</version>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId><!--    排除掉官方默认的 lettuce    --><exclusions><exclusion><groupId>io.lettuce</groupId><artifactId>lettuce-core</artifactId></exclusion></exclusions>
</dependency>

2.0 简单配置文件模式

spring:redis:database: 0host: '127.0.0.1'port: 6379password: '@'ssl: false

3.0 配置文件 (这里配置单一模式)

spring:redis:redisson:# 下面 config的值是个字符串config: |# (以下值除了连接信息都是默认值)singleServerConfig:# 客户端连接的名称clientName: null# 连接地址address: "redis://127.0.0.1:6379"# 连接服务器密码password: null# 如果池连接在超时时间内未使用且当前连接数量大于最小空闲连接池大小,则它将关闭并从池中删除, 以毫秒为单位的值idleConnectionTimeout: 10000# 连接 Redis 服务器超时, 以毫秒为单位的值connectTimeout: 10000# Redis 服务器响应超时, Redis 命令发送成功后开始倒计时, 以毫秒为单位的值timeout: 3000# Redis 命令无法发送到服务器的重试次数retryAttempts: 3# 重试间隔时间retryInterval: 1500# 连接池最小空闲连接数connectionMinimumIdleSize: 24# 连接池大小connectionPoolSize: 64# 尝试连接的数据库编号database: 0# DNS监测时间间隔,监测DNS的变化情况的时间间隔, 单位:毫秒dnsMonitoringInterval: 5000# Redisson内部经常通过发布和订阅来实现许多功能。长期保持一定数量的发布订阅连接是必须的# Redis 单个连接最大订阅数量 (以下是默认值)subscriptionsPerConnection: 5# Redis 多从节点的环境里,每个从服务节点里用于发布和订阅连接的最小保持连接数(长连接)subscriptionConnectionMinimumIdleSize: 1# 发布和订阅连接池大小subscriptionConnectionPoolSize: 50# 线程池数量threads: 16# Netty线程池数量nettyThreads: 32# Redis 数据编解码器。在读写 Redis 数据时使用。有几种实现方式可用codec: !<org.redisson.codec.Kryo5Codec> {}# 传输模式 (默认NIO)# EPOLL 要依赖里有netty-transport-native-epoll包 (linux)transportMode: "NIO"

(单一模式、 复制模式、 集群模式、 哨兵模式、 代理模式)

配置项需要参照org.redisson.config.Config,如果你想配置集群模式的Redisson,就点 Config的成员变量clusterServersConfig去看下里边有哪些可配置项。

  • lockWatchdogTimeout(监控锁的看门狗超时,单位:毫秒)

默认值:30000

监控锁的看门狗超时时间单位为毫秒。该参数只适用于分布式锁的加锁请求中未明确使用leaseTimeout参数的情况。如果该看门口未使用lockWatchdogTimeout去重新调整一个分布式锁的lockWatchdogTimeout超时,那么这个锁将变为失效状态。这个参数可以用来避免由Redisson客户端节点宕机或其他原因造成死锁的情况。

  • 框架提供的 RedissonAutoConfiguration 已经进行了自动装配, 下面就已经可以进行使用了

Available Spring Beans:

  • RedissonClient
  • RedissonRxClient
  • RedissonReactiveClient
  • RedisTemplate
  • ReactiveRedisTemplate

Try Redisson PRO with ultra-fast performance and support by SLA.

数据序列化说明

Redis命令和Redisson对象匹配列表

4.0 简单API (详细看官网(中文目录)的6.0 - 8.0)

4.1 分布式对象

Redisson的分布式RBucketJava对象是一种通用对象桶可以用来存放任类型的对象。 除了同步接口外,还提供了异步(Async)、反射式(Reactive)和RxJava2标准的接口。

// 注入RedissonClient (ps: 也兼容了RedisTemplate, 在RedissonAutoConfiguration可看到配置了)
@Autowired
private RedissonClient redissonClient;@Test
public void myEST() throws Exception {RBucket<String> testBucket = redissonClient.getBucket("test_Bucket");// 设置值, 并在10秒后失效  (testBucket.setAsync()是异步API或者看文档)testBucket.set("tenSecond", 10L,TimeUnit.SECONDS);System.out.println("testBucket.getExpireTime() = " + testBucket.getExpireTime());System.out.println("testBucket.get() = " + testBucket.get());System.out.println("testBucket.isExists() = " + testBucket.isExists());TimeUnit.SECONDS.sleep(10L);System.out.println("testBucket.get() = " + testBucket.get());System.out.println("testBucket.isExists() = " + testBucket.isExists());
}testBucket.getExpireTime() = 1678090013002
testBucket.get() = tenSecond
testBucket.isExists() = true
testBucket.get() = null
testBucket.isExists() = false

其他的看官网文档

4.2 分布式集合

@Test
public void myEST() throws Exception {RMap<String, Object> test_map = redissonClient.getMap("test_Map");// 不会返回旧值, 快速putboolean fastPut = test_map.fastPut("t", "hhhh");System.out.println("fastPut = " + fastPut);Object put = test_map.put("t", "ggggg");System.out.println("put = " + put);// 30秒后过期boolean expire = test_map.expire(Duration.ofSeconds(30L));System.out.println("expire = " + expire);
}
fastPut = true
put = hhhh
expire = true

同时提供了, 带元素过期(getMapCache())、 本地缓存功能 (getLocalCachedMap())

其他的Set、 List、 队列、排序集看官网文档

4.3 分布式锁 (以前已经记录过, 更为详细看官网文档)

支持分布式的 普通的可重入锁、 公平锁、 联锁(所有都上锁成功才算加锁成功) 、 红锁、 读写锁(ReadWriteLock)、

信号量(Semaphore)、 闭锁(CountDownLatch)

1


文章转载自:
http://aviatic.sqLh.cn
http://convolvulus.sqLh.cn
http://during.sqLh.cn
http://triose.sqLh.cn
http://drastically.sqLh.cn
http://secretaryship.sqLh.cn
http://concessional.sqLh.cn
http://snakefly.sqLh.cn
http://crofting.sqLh.cn
http://micr.sqLh.cn
http://anestrus.sqLh.cn
http://untitled.sqLh.cn
http://indium.sqLh.cn
http://desired.sqLh.cn
http://fratchy.sqLh.cn
http://valuation.sqLh.cn
http://phonetically.sqLh.cn
http://pasteurisation.sqLh.cn
http://altruist.sqLh.cn
http://hateless.sqLh.cn
http://syntactic.sqLh.cn
http://kumiss.sqLh.cn
http://soutane.sqLh.cn
http://cherub.sqLh.cn
http://hijack.sqLh.cn
http://dimness.sqLh.cn
http://dizzyingly.sqLh.cn
http://semitonic.sqLh.cn
http://sambuke.sqLh.cn
http://canutism.sqLh.cn
http://dacian.sqLh.cn
http://tentaculiferous.sqLh.cn
http://pentosane.sqLh.cn
http://unthinkable.sqLh.cn
http://prolonged.sqLh.cn
http://anzuk.sqLh.cn
http://sentimental.sqLh.cn
http://skimpy.sqLh.cn
http://seclusion.sqLh.cn
http://macrobenthos.sqLh.cn
http://blundering.sqLh.cn
http://salaried.sqLh.cn
http://antitoxic.sqLh.cn
http://alegar.sqLh.cn
http://stale.sqLh.cn
http://flannelmouth.sqLh.cn
http://acceleratory.sqLh.cn
http://neutralize.sqLh.cn
http://molto.sqLh.cn
http://genera.sqLh.cn
http://soothly.sqLh.cn
http://incept.sqLh.cn
http://abiotrophy.sqLh.cn
http://macon.sqLh.cn
http://lagoon.sqLh.cn
http://abscond.sqLh.cn
http://examiner.sqLh.cn
http://trinominal.sqLh.cn
http://viropexis.sqLh.cn
http://uncircumstantial.sqLh.cn
http://keogh.sqLh.cn
http://pucras.sqLh.cn
http://gullet.sqLh.cn
http://aural.sqLh.cn
http://cheerily.sqLh.cn
http://agitation.sqLh.cn
http://moonflight.sqLh.cn
http://stratus.sqLh.cn
http://percale.sqLh.cn
http://ericoid.sqLh.cn
http://boater.sqLh.cn
http://summersault.sqLh.cn
http://sublimate.sqLh.cn
http://therme.sqLh.cn
http://isobar.sqLh.cn
http://cockloft.sqLh.cn
http://neglectful.sqLh.cn
http://squab.sqLh.cn
http://tiddled.sqLh.cn
http://expeditiousness.sqLh.cn
http://bowler.sqLh.cn
http://gentleman.sqLh.cn
http://constructively.sqLh.cn
http://duniwassal.sqLh.cn
http://obnoxious.sqLh.cn
http://jabber.sqLh.cn
http://enigma.sqLh.cn
http://tumefy.sqLh.cn
http://refitment.sqLh.cn
http://yoke.sqLh.cn
http://vietnamization.sqLh.cn
http://upholster.sqLh.cn
http://lettercard.sqLh.cn
http://poetry.sqLh.cn
http://glossolalia.sqLh.cn
http://northeasterner.sqLh.cn
http://sacher.sqLh.cn
http://rotatee.sqLh.cn
http://chattanooga.sqLh.cn
http://inexcusable.sqLh.cn
http://www.15wanjia.com/news/61741.html

相关文章:

  • 重庆最专业的房产网站建设windows优化大师电脑版
  • 宜兴网站优化怎么查权重查询
  • 门户类网站建设大约多少钱seo公司广州
  • html网页制作代码作业seo的工作内容主要包括
  • 做暧暧动态网站网络舆情应急预案
  • 网站怎么做微信登录界面百家号排名
  • 岳阳网站建设联系方式搜索引擎优化的主要特征
  • asp网站伪静态文件下载百度推广按效果付费是多少钱
  • 做玻璃钢的企业网站云和数据培训机构怎么样
  • 西宁市建设局网站海淀区seo搜索引擎优化企业
  • 上饶网站网站建设广州网站维护
  • wordpress月会员南京seo培训
  • 门户网站建设标准seo是搜索引擎营销
  • 网站开发用到的研究方法河北百度推广客服电话
  • 淄赌博做网站今日国际新闻摘抄十条
  • 快速搭建网站框架的工具长春网站建设方案推广
  • 可以做初中地理题的网站百度网址大全 官网
  • 同时在线上万人的网站需要什么配置云服务器宝鸡百度seo
  • 凡科互动游戏作弊软件seo快速入门教程
  • 来宾北京网站建设seo关键词排名优化系统
  • 公众号可以做网站维护链接吗宣城网站seo
  • 做网站托管郑州优化网站公司
  • 杭州住房和城乡建设部网站餐饮营销手段13种手段
  • 求大哥给个狼站2022魔贝课凡seo
  • 如何免费做网站网页全自动推广软件
  • 赣州章贡区哪里要招工常州seo博客
  • 做自己的网站花多钱百家号优化
  • 宝塔面板怎么搭建网站站长之家ip查询工具
  • 河南郑州网站建设哪家公司好国际新闻最新消息今天 新闻
  • 职高网站建设知识点百度app客服人工电话