Skip to content

Instantly share code, notes, and snippets.

@fasseg
Created October 24, 2013 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fasseg/7137017 to your computer and use it in GitHub Desktop.
Save fasseg/7137017 to your computer and use it in GitHub Desktop.
basic/infinispan.xml
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"
xmlns="urn:infinispan:config:5.2">
<global>
<globalJmxStatistics enabled="true" allowDuplicateDomains="true"/>
</global>
<default>
</default>
<namedCache name="FedoraRepository">
<eviction maxEntries="500" strategy="LIRS" threadPolicy="DEFAULT"/>
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->
<loaders passivation="false" shared="false" preload="false">
<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.repo.CacheDirPath:target/FedoraRepository/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>
</loaders>
</namedCache>
<namedCache name="FedoraRepositoryMetaData">
<eviction maxEntries="500" strategy="LIRS" threadPolicy="DEFAULT"/>
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->
<loaders passivation="false" shared="false" preload="false">
<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.CacheDirPath:target/FedoraRepositoryMetaData/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>
</loaders>
</namedCache>
<namedCache name="FedoraRepositoryBinaryData">
<eviction maxEntries="100" strategy="LIRS" threadPolicy="DEFAULT"/>
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL" lockingMode="PESSIMISTIC"/>
<!--
Define the cache loaders (i.e., cache stores). Passivation is false because we want *all*
data to be persisted, not just what doesn't fit into memory. Shared is false because there
are no other caches sharing this file store. We set preload to false for lazy loading;
may be improved by preloading and configuring eviction.
We can have multiple cache loaders, which get chained. But we'll define just one.
-->
<loaders passivation="false" shared="false" preload="false">
<!--
The 'fetchPersistentState' attribute applies when this cache joins the cluster; the value doesn't
really matter to us in this case. See the documentation for more options.
-->
<loader class="org.infinispan.loaders.file.FileCacheStore" fetchPersistentState="true"
purgeOnStartup="false">
<!-- See the documentation for more configuration examples and flags. -->
<properties>
<!-- We have to set the location where we want to store the data. -->
<property name="location" value="${fcrepo.ispn.binary.CacheDirPath:target/FedoraRepositoryBinaryData/storage}"/>
<property name="fsyncMode" value="perWrite"/>
</properties>
<!-- This repository isn't clustered, so we could set up the SingletonStore.
singletonStore enabled="true" pushStateWhenCoordinator="true" pushStateTimeout="20000"/>
-->
<!--
We could use "write-behind", which actually writes to the file system asynchronously,
which can improve performance as seen by the JCR client.
Plus changes are coalesced, meaning that if multiple changes are enqueued for the
same node, only the last one is written. (This is good much of the time, but not
always.)
<async enabled="true" flushLockTimeout="15000" threadPoolSize="5"/>
-->
</loader>
</loaders>
</namedCache>
</infinispan>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment