See: Description
| Package | Description |
|---|---|
| com.nimbusds.infinispan.persistence.sql |
SQL store for Infinispan 8.2+ caches and maps.
|
Cache loader / writer for an SQL database backend.
AdvancedLoadWriteStore
SPI${sys-prop-name:default-value} format SQLRecordTransformer to translate between
Infinispan entries (key / value pairs with optional metadata) and
SQL records.SQLStoreConfiguration. Also, see the example
below. Note that the SQL store can safely shared between multiple
replicated / distributed instances of a cache. It can also be used
in read-only mode.Maven coordinates:
<groupId>com.nimbusds</groupId>
<artifactId>infinispan-sql-cache-store</artifactId>
<version>[ version ]</version>
where [ version ] should be the latest stable version.
Example Infinispan configuration for a cache backed by an H2 SQL database:
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:8.2 http://www.infinispan.org/schemas/infinispan-config-8.2.xsd"
xmlns="urn:infinispan:config:8.2">
<cache-container name="myCacheContainer" default-cache="myMap" statistics="true">
<jmx duplicate-domains="true"/>
<local-cache name="myMap">
<eviction type="COUNT" size="100"/>
<persistence passivation="false">
<store class="com.nimbusds.infinispan.persistence.sql.SQLStore"
fetch-state="false"
preload="false"
shared="true"
purge="true"
read-only="false"
singleton="false">
<property name="sqlStore.recordTransformer">com.nimbusds.infinispan.persistence.sql.UserRecordTransformer</property>
<property name="sqlStore.sqlDialect">H2</property>
<property name="jdbcUrl">jdbc:h2:/var/lib/h2/users.db</property>
<property name="username">admin</property>
<property name="password">secret</property>
</store>
</persistence>
</local-cache>
</cache-container>
</infinispan>
Copyright © 2016 Connect2id Ltd.. All Rights Reserved.