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:7.2"
            xsi:schemaLocation="urn:infinispan:config:7.2 http://www.infinispan.org/schemas/infinispan-config-7.2.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"/>

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

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

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

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

      <!-- 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 name="timestamps" mode="ASYNC">
         <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>

      <!-- This configuration should match to InfinispanRegionFactory.DEFAULT_PENDING_PUTS_CACHE_CONFIGURATION -->
      <local-cache name="pending-puts" statistics="false">
         <transaction mode="NONE"/>
         <expiration max-idle="60000" />
      </local-cache>
   </cache-container>

</infinispan>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy