此内容没有您所选择的语言版本。

2.3. Directory Providers


The following directory providers are supported in Infinispan Query:
  • RAM Directory Provider
  • Filesystem Directory Provider
  • Infinispan Directory Provider

2.3.1. RAM Directory Provider

Storing the global index locally in Red Hat JBoss Data Grid's Query Module allows each node to
  • maintain its own index.
  • use Lucene's in-memory or filesystem-based index directory.
The following example demonstrates an in-memory, RAM-based index store:
<namedCache name="indexesInMemory">
        <indexing enabled="true">
                <properties>
                        <property name="default.directory_provider" value="ram"/>
                </properties>
        </indexing>
</namedCache>
Copy to Clipboard Toggle word wrap

2.3.2. Filesystem Directory Provider

To configure the storage of indexes, set the appropriate properties when enabling indexing in the JBoss Data Grid configuration.
This example shows a disk-based index store:

Example 2.1. Disk-based Index Store

<namedCache name="indexesOnDisk">
        <indexing enabled="true">
                <properties>
                        <property name="default.directory_provider" value="filesystem"/>
                        <property name="default.indexBase" value="/tmp/ispn_index"/>
                </properties>
        </indexing>
</namedCache>
Copy to Clipboard Toggle word wrap

2.3.3. Infinispan Directory Provider

In addition to the Lucene directory implementations, Red Hat JBoss Data Grid also ships with an infinispan-directory module.

Note

Red Hat JBoss Data Grid only supports infinispan-directory in the context of the Querying feature, not as a standalone feature.
The infinispan-directory allows Lucene to store indexes within the distributed data grid. This allows the indexes to be distributed, stored in-memory, and optionally written to disk using the cache store for durability.
Sharing the same index instance using the Infinispan Directory Provider, introduces a write contention point, as only one instance can write on the same index at the same time. The property exclusive_index_use must be set to "false" and in most cases an alternative back end must be setup.
InfinispanIndexManager provides a default back end that sends all updates to master node which later applies the updates to the index. In case of master node failure, the update can be lost, therefore keeping the cache and index non-synchronized. Non-default back ends are not supported.

Example 2.2. Enable Shared Indexes

<namedCache name="globalSharedIndexes">
	<clustering mode="distributed"/>
	<indexing enabled="true">
		<properties>
			<property name="default.directory_provider" value="infinispan"/>
			<property name="default.indexmanager" value="org.infinispan.query.indexmanager.InfinispanIndexManager" />
			<property name="default.exclusive_index_use" value="{true|false}"/>
		</properties>
	</indexing>
</namedCache>
Copy to Clipboard Toggle word wrap

Important

The default.exclusive_index_use configuration property in the provided sample configuration is set depending on which version of Red Hat JBoss Data Grid is in use:
  • when using JBoss Data Grid 6.3.0, set the default.exclusive_index_use to false.
  • when using JBoss Data Grid 6.3.1, to improve performance, either exclude default.exclusive_index_use (the default value true is then used) or explicitly set the value to true.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat