Infinispan分布式网格数据平台

本文详细解析Infinispan配置文件,涵盖全局设置、缓存策略、并发控制、JMX统计、集群通信等多个方面,助你深入了解并优化Infinispan分布式数据平台。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

先贴出Infinispan配置文件说明:

<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
 xmlns="urn:infinispan:config:5.0">

 <!-- 定义全局缓存策略 -->
 <global>
  <!-- 交通工具,集群通信工具 -->
  <transport machineId="computer_01" siteId="site_001"
   strictPeerToPeer="true"
   transportClass="org.infinispan.remoting.transport.jgroups.JGroupsTransport"
   rackId="null" clusterName="infinispan_cluster" nodeName="node_01"
   distributedSyncTimeout="240000">
  </transport>

  <!-- 当JVM关闭的cache instance的时候
   hookBehavior:(DEFAULT|REGISTER|DONT_REGISTER)
  -->
  <shutdown hookBehavior="DEFAULT" />
  <!--用户定时刷新复制队列,如果useReplQueue 设置为true的时候用于刷新队列的执行器  -->
  <replicationQueueScheduledExecutor
   factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
   <properties>
    <property name="threadNamePrefix"
     value="replicationQueueScheduledExecutor_thread" />
    <!-- 核心线程数目 -->
    <property name="maxThreads" value="10" />
   </properties>

  </replicationQueueScheduledExecutor>

  <!-- 配置全局是否使用JMX配管理统计
   cacheManagerName:如果JMX统计被启动,这个属性代表这个缓存管理器名称
   jmxDomain:jmx域名
   enabled:默认是false,是否被JMX来管理开关
   mBeanServerLookup:Fully qualified name of class that will attempt to locate a JMX MBean server to bind to
   allowDuplicateDomains:默认是false,如果设置为true,multiple cache manager instances could be configured under the same configured JMX domain. Each cache manager will in practice use a different JMX domain that has been calculated based on the configured one by adding an incrementing index to it
  -->
  <globalJmxStatistics allowDuplicateDomains="false"
   enabled="true" cacheManagerName="infinispan_jmxManage"
   jmxDomain="org.infinispan"
   mBeanServerLookup="org.infinispan.jmx.PlatformMBeanServerLookup" />
  <!-- 异步侦听执行器,用于向异步侦听器发送通知
   factory:执行器工厂类名称,重写实现该类必须继承org.infinispan.executors.ExecutorFactory
  -->
  <asyncListenerExecutor
   factory="org.infinispan.executors.DefaultExecutorFactory">
   <!-- 异步执行器的属性设置 -->
   <properties>
    <!--  threadNamePrefix:线程名称前缀。 -->
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值