このコンテンツは選択した言語では利用できません。

18.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.

18.5.1. Configuring LevelDB Cache Store (Remote Client-Server Mode)

Procedure 18.1. To configure LevelDB Cache Store:

  • Add the following elements 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" />
        <implementation type="JNI" />
    </leveldb-store>
    Copy to Clipboard Toggle word wrap
For details about the elements and parameters used in this sample configuration, see Section 18.3, “Cache Store Configuration Details (Remote Client-Server Mode)”.

18.5.2. LevelDB Cache Store Programmatic Configuration

The following is a sample programmatic configuration of LevelDB Cache Store:
Configuration cacheConfig = new ConfigurationBuilder().persistence()
                .addStore(LevelDBStoreConfigurationBuilder.class)
                .location("/tmp/leveldb/data")
                .expiredLocation("/tmp/leveldb/expired").build();
Copy to Clipboard Toggle word wrap

Procedure 18.2. LevelDB Cache Store programmatic configuration

  1. Use the ConfigurationBuilder to create a new configuration object.
  2. Add the store using LevelDBCacheStoreConfigurationBuilder class to build its configuration.
  3. Set the LevelDB Cache Store location path. The specified path stores the primary cache store data. The directory is automatically created if it does not exist.
  4. Specify the location for expired data using the expiredLocation parameter for the LevelDB Store. The specified path stores expired data before it is purged. The directory is automatically created if it does not exist.

Note

Programmatic configurations can only be used with Red Hat JBoss Data Grid Library mode.

18.5.3. LevelDB Cache Store Sample XML Configuration (Library Mode)

The following is a sample XML configuration of LevelDB Cache Store:
<namedCache name="vehicleCache">
      <persistence passivation="false">
          <leveldbStore xmlns="urn:infinispan:config:store:leveldb:6.0
                        location="/path/to/leveldb/data"  
                        expiredLocation="/path/to/expired/data" 
                        shared="false"
                        preload="true"/>
      </persistence>
   </namedCache>
Copy to Clipboard Toggle word wrap
For details about the elements and parameters used in this sample configuration, see Section 18.2, “Cache Store Configuration Details (Library Mode)”.

18.5.4. Configure a LevelDB Cache Store Using JBoss Operations Network

Use the following procedure to set up a new LevelDB cache store using the JBoss Operations Network.

Procedure 18.3. 

  1. Ensure that Red Hat JBoss Operations Network 3.2 or better is installed and started.
  2. Install the Red Hat JBoss Data Grid Plugin Pack for JBoss Operations Network 3.2.0.
  3. Ensure that JBoss Data Grid is installed and started.
  4. Import JBoss Data Grid server into the inventory.
  5. Configure the JBoss Data Grid connection settings.
  6. Create a new LevelDB cache store as follows:

    Figure 18.1. Create a new LevelDB Cache Store

    1. Right-click the default cache.
    2. In the menu, mouse over the Create Child option.
    3. In the submenu, click LevelDB Store.
  7. Name the new LevelDB cache store as follows:

    Figure 18.2. Name the new LevelDB Cache Store

    1. In the Resource Create Wizard that appears, add a name for the new LevelDB Cache Store.
    2. Click Next to continue.
  8. Configure the LevelDB Cache Store settings as follows:

    Figure 18.3. Configure the LevelDB Cache Store Settings

    1. Use the options in the configuration window to configure a new LevelDB cache store.
    2. Click Finish to complete the configuration.
  9. Schedule a restart operation as follows:

    Figure 18.4. Schedule a Restart Operation

    1. In the screen's left panel, expand the JBossAS7 Standalone Servers entry, if it is not currently expanded.
    2. Click JDG (0.0.0.0:9990) from the expanded menu items.
    3. In the screen's right panel, details about the selected server display. Click the Operations tab.
    4. In the Operation drop-down box, select the Restart operation.
    5. Select the radio button for the Now entry.
    6. Click Schedule to restart the server immediately.
  10. Discover the new LevelDB cache store as follows:

    Figure 18.5. Discover the New LevelDB Cache Store

    1. In the screen's left panel, select each of the following items in the specified order to expand them: JBossAS7 Standalong Servers JDG (0.0.0.0:9990) infinispan Cache Containers local Caches default LevelDB Stores
    2. Click the name of your new LevelDB Cache Store to view its configuration information in the right panel.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat