See: Description
| Package | Description |
|---|---|
| com.nimbusds.infinispan.persistence.sql |
SQL store for Infinispan 8.2+ caches and maps.
|
| com.nimbusds.infinispan.persistence.sql.config |
Configuration classes.
|
| com.nimbusds.infinispan.persistence.sql.query |
SQL query executor interfaces.
|
| com.nimbusds.infinispan.persistence.sql.transformers |
Transformation utilities for Java collections and other complex classes.
|
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-cachestore-sql</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"
xmlns:sql="urn:infinispan:config:store:sql:2.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">
<sql-store xmlns="urn:infinispan:config:store:sql:2.2"
shared="true"
record-transformer="com.nimbusds.infinispan.persistence.sql.UserRecordTransformer"
sql-dialect="H2">
<property name="jdbcUrl">jdbc:h2:mem:test;DATABASE_TO_UPPER=false</property>
<property name="username">admin</property>
<property name="password">secret</property>
</sql-store>
</persistence>
</local-cache>
</cache-container>
</infinispan>
Copyright © 2016 Connect2id Ltd.. All Rights Reserved.