All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.cache.infinispan.builder.infinispan-configs.xml Maven / Gradle / Ivy

There is a newer version: 5.6.15.Final
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Hibernate, Relational Persistence for Idiomatic Java
  ~
  ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
  ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  -->
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="urn:infinispan:config:8.0"
            xsi:schemaLocation="urn:infinispan:config:8.0 http://www.infinispan.org/schemas/infinispan-config-8.0.xsd">

   <jgroups>
      <stack-file name="hibernate-jgroups" path="${hibernate.cache.infinispan.jgroups_cfg:default-configs/default-jgroups-tcp.xml}"/>
   </jgroups>

   <cache-container name="SampleCacheManager" statistics="false" default-cache="the-default-cache" shutdown-hook="DEFAULT">
      <transport stack="hibernate-jgroups" cluster="infinispan-hibernate-cluster"/>
      <jmx duplicate-domains="true"/>

      <local-cache-configuration name="the-default-cache" statistics="false" />

      <!-- Default configuration is appropriate for entity/collection caching. -->
      <invalidation-cache-configuration name="entity" mode="SYNC" remote-timeout="20000" statistics="false" statistics-available="false">
         <locking concurrency-level="1000" acquire-timeout="15000"/>
         <transaction mode="NONE" />
         <eviction max-entries="10000" strategy="LRU"/>
         <expiration max-idle="100000" interval="5000"/>
      </invalidation-cache-configuration>

      <!-- A config appropriate for query caching. Does not replicate queries. -->
      <local-cache-configuration name="local-query" statistics="false" statistics-available="false">
         <locking concurrency-level="1000" acquire-timeout="15000"/>
         <transaction mode="NONE" />
         <eviction max-entries="10000" strategy="LRU"/>
         <expiration max-idle="100000" interval="5000"/>
      </local-cache-configuration>

      <!-- A query cache that replicates queries. Replication is asynchronous. -->
      <replicated-cache-configuration name="replicated-query" mode="ASYNC" statistics="false" statistics-available="false">
         <locking concurrency-level="1000" acquire-timeout="15000"/>
         <transaction mode="NONE" />
         <eviction max-entries="10000" strategy="LRU"/>
         <expiration max-idle="100000" interval="5000"/>
      </replicated-cache-configuration>

      <!-- Optimized for timestamp caching. A clustered timestamp cache
           is required if query caching is used, even if the query cache
           itself is configured with CacheMode=LOCAL. -->
      <replicated-cache-configuration name="timestamps" mode="ASYNC" statistics="false" statistics-available="false">
         <locking concurrency-level="1000" acquire-timeout="15000"/>
         <!-- Explicitly non transactional -->
         <transaction mode="NONE"/>
         <!--  Don't ever evict modification timestamps -->
         <eviction strategy="NONE"/>
         <expiration interval="0"/>
      </replicated-cache-configuration>

      <!-- When providing custom configuration, always make this cache local and non-transactional.
           To avoid possible leaks, use expiration (max idle time). Optimize for speed.-->
      <local-cache-configuration name="pending-puts" simple-cache="true" statistics="false" statistics-available="false">
         <transaction mode="NONE"/>
         <expiration max-idle="60000" />
      </local-cache-configuration>
   </cache-container>

</infinispan>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy