Skip navigation links

Infinispan DynamoDB cache store v1.3

Cache loader / writer for an AWS DynamoDB database backend.

See: Description

Packages 
Package Description
com.nimbusds.infinispan.persistence.dynamodb
DynamoDB store for Infinispan.
com.nimbusds.infinispan.persistence.dynamodb.config
Configuration classes.
com.nimbusds.infinispan.persistence.dynamodb.logging
Logging.
com.nimbusds.infinispan.persistence.dynamodb.query
DynamoDB query executor interfaces.

Cache loader / writer for an AWS DynamoDB database backend.

Requirements

Features

Usage

  1. Add the Maven dependency for the DynamoDB cache store, or make sure its JAR is present in the CLASSPATH of your project.
  2. Implement DynamoDBItemTransformer to translate between Infinispan entries (key / value pairs with optional metadata) and DynamoDB items.
  3. Configure a DynamoDB store for each Infinispan cache that requires one, by setting the attributes specified in DynamoDBStoreConfiguration. Also, see the example below. Note that the DynamoDB store can safely shared between multiple replicated / distributed instances of a cache. It can also be used in read-only mode.

Maven

Maven coordinates:

    <groupId>com.nimbusds</groupId>
    <artifactId>infinispan-cachestore-dynamodb</artifactId>
    <version>[ version ]</version>

where [ version ] should be the latest stable version.

Example configuration

<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:dynamodb="urn:infinispan:config:store:dynamodb:1.0">

    <cache-container name="myCacheContainer" default-cache="users">
        <jmx duplicate-domains="true"/>
        <local-cache name="users">
            <eviction size="100"/>
            <persistence>
                <dynamodb:dynamodb-store
                    shared="true"
                    region="us-east-1"
                    item-transformer="com.nimbusds.infinispan.persistence.dynamodb.UserItemTransformer"
                    aws-access-key-id="AID2SAESIESH3ACH"
                    aws-secret-access-key="ush9aa1thibi7uvaishoiMod6Ahz6ome"
                />
            </persistence>
        </local-cache>
    </cache-container>

</infinispan>
Skip navigation links

Copyright © 2017 Connect2id Ltd.. All Rights Reserved.