13.5. LevelDB Cache Store


LevelDB is a key-value storage engine that provides an ordered mapping from string keys to string values.
The LevelDB Cache Store uses two filesystem directories. Each directory is configured for a LevelDB database. One directory stores the non-expired data and the second directory stores the expired keys before a purge.

13.5.1. Configuring LevelDB Cache Store

Procedure 13.5. To configure LevelDB Cache Store:

  1. Obtain the leveldbjni-all-1.7.jar file from https://github.com/fusesource/leveldbjni and copy it to the modules/system/layers/base/org/fusesource/leveldbjni-all/main directory.
  2. Modify the module.xml file to include JAR files in the resources:
    <module xmlns="urn:jboss:module:1.1" name="org.fusesource.leveldbjni-all">
       <properties>
          <property name="jboss.api" value="private"/>
       </properties>
    
       <resources>
          <resource-root path="leveldbjni-all-1.7.jar"/>
            <!-- Insert resources here -->
       </resources>
    
       <dependencies>
       </dependencies>
    </module>
    
  3. Add the following to a cache definition in standalone.xml to configure the database:
    <leveldb-store path="/path/to/leveldb/data"
        passivation="false"
        purge="false" >
        <expiration path="/path/to/leveldb/expires/data" />
    </leveldb-store>
    

Note

The LevelDB library and JNI connector are not part of the JBoss Data Grid 6.2 distribution. To use the tested version, add the file leveldbjni-all-1.7.jar from https://github.com/fusesource/leveldbjni to your JBoss Data Grid deployment.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.