The CloudCacheStore
implementation utilizes JClouds
to communicate with cloud storage providers such as Amazon’s S3,
Rackspace’s Cloudfiles
or any other such provider supported by JClouds.
If you’re planning to use Amazon S3 for storage, consider using it with Infinispan. Infinispan itself provides in-memory caching for your data to minimize the amount of remote access calls, thus reducing the latency and cost of fetching your Amazon S3 data.
With cache replication, you are also able to load data from your local cluster without having to remotely access it every time.
Note that Amazon S3 does not support transactions.
If transactions are used in your application then there is some possibility of state inconsistency when using this cache loader.
However, writes are atomic, in that if a write fails nothing is considered written and data is never corrupted.
For a list of configuration refer to the javadoc .
Note
|
for details on configuration specific to each underlying provider, refer to the JClouds BlobStore docs at https://jclouds.apache.org/reference/providers/#blobstore |
The following example shows how to connect to an S3 store:
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:9.4 http://www.infinispan.org/schemas/infinispan-config-9.4.xsd"
xmlns="urn:infinispan:config:9.0">
<cache-container default-cache="default">
<local-cache name="default">
<persistence passivation="false">
<cloud-store xmlns="urn:infinispan:config:store:cloud:9.4"
provider="aws-s3"
identity="me" credential="s3cr3t"
compress="true"
normalize-cache-names="true"/>
</persistence>
</local-cache>
</cache-container>
</infinispan>