50 lines
3.2 KiB
XML
50 lines
3.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<serivce-core>
|
||
<log4jPath>log4j.properties</log4jPath>
|
||
|
||
<plugin>
|
||
<id>redis</id>
|
||
<class>com.taurus.core.plugin.redis.RedisPlugin</class>
|
||
|
||
<poolConfig>
|
||
<!-- 最大连接数, 默认8个 -->
|
||
<maxTotal>200</maxTotal>
|
||
<!-- 最大空闲连接数, 默认8个 -->
|
||
<maxIdle>8</maxIdle>
|
||
<!-- 最尝空闲连接数, 默认0个 -->
|
||
<minIdle>1</minIdle>
|
||
<!-- 获坖连接时的最大等待毫秒数(如果设置为阻塞时BlockWhenExhausted),如果超时就抛异常, 尝于零:阻塞丝确定的时间, 默认-1 -->
|
||
<maxWaitMillis>50</maxWaitMillis>
|
||
<!-- 在borrow一个jedis实例时,是坦杝剝进行alidate擝作, 默认false -->
|
||
<testOnBorrow>true</testOnBorrow>
|
||
<!-- 在return给pool时,是坦杝剝进行validate擝作, 默认false -->
|
||
<testOnReturn>true</testOnReturn>
|
||
<!-- 表示有一个idle object evitor线程对idle object进行扫杝,如果validate失败,
|
||
此object会被从pool中drop掉;这一项坪有在timeBetweenEvictionRunsMillis大于0时扝有愝义, 默认true -->
|
||
<testWhileIdle>true</testWhileIdle>
|
||
<!-- 表示idle object evitor毝次扫杝的最多的对象数, 默认-1 -->
|
||
<numTestsPerEvictionRun>100</numTestsPerEvictionRun>
|
||
<!-- 表示一个对象至少坜留在idle状思的最短时间,然坎扝能被idle object evitor扫杝并驱逝;
|
||
这一项坪有在timeBetweenEvictionRunsMillis大于0时扝有愝义 , 默认60000-->
|
||
<minEvictableIdleTimeMillis>60000</minEvictableIdleTimeMillis>
|
||
<!-- 逝出扫杝的时间间隔(毫秒) 如果为负数,则丝违行逝出线程, 默认30000 -->
|
||
<timeBetweenEvictionRunsMillis>30000</timeBetweenEvictionRunsMillis>
|
||
<!-- 在minEvictableIdleTimeMillis基础上,加入了至少minIdle个对象已绝在pool里面了。
|
||
如果为-1,evicted丝会根杮idle time驱逝任何对象。如果minEvictableIdleTimeMillisd大于0,
|
||
则此项设置无愝义,且坪有在timeBetweenEvictionRunsMillis大于0时扝有愝义,默认1800000 -->
|
||
<softMinEvictableIdleTimeMillis>1800000</softMinEvictableIdleTimeMillis>
|
||
<!-- 连接耗尽时是坦阻塞, false报异常,ture阻塞直到超时, 默认true -->
|
||
<blockWhenExhausted>true</blockWhenExhausted>
|
||
</poolConfig>
|
||
|
||
<infos>
|
||
<info name="group1_db0" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="0" timeout="5000"/>
|
||
<info name="group1_db1" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="1" timeout="5000"/>
|
||
<info name="group1_db5" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="5" timeout="5000"/>
|
||
<info name="group1_db8" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="8" timeout="5000"/>
|
||
<info name="group1_db10" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="10" timeout="5000"/>
|
||
<info name="group1_db11" host="r-7xvtyqmjz8rdzynefh.redis.rds.aliyuncs.com" password="Lvyell7@redis" port="6379" database="11" timeout="5000"/>
|
||
</infos>
|
||
</plugin>
|
||
</serivce-core>
|