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

Chapter 1. Remote caches


Deploy multiple Data Grid Server instances to create remote cache clusters that give you a fault-tolerant and scalable data tier with high-speed access from Hot Rod and REST clients.

1.1. Remote cache tutorials

To run these tutorials you need at least one locally running instance of Data Grid Server. Each tutorial will try to connect to a running server in localhost:11222 with admin/password credentials. However, if a Docker instance is found, and the server is not running, tutorials will spin up a local server with Testcontainers.

You can download the distribution and run the following commands:

$ ./bin/cli.sh user create admin -p "password"
$ ./bin/server.sh
Copy to Clipboard Toggle word wrap
Note

Data Grid Server enables authentication and authorization by default. Creating a user named admin gives you administrative access to Data Grid Server.

Building and running remote cache tutorials

You can build and run remote cache tutorials directly in your IDE or from the command line as follows:

$ mvn -s /path/to/maven-settings.xml clean package exec:exec
Copy to Clipboard Toggle word wrap

1.2. Hot Rod Java client tutorials

  • Data Grid requires Java 11 at a minimum. However, Hot Rod Java clients running in applications that require Java 8 can continue using older versions of client libraries.
Expand
Tutorial linkDescription

Remote cache use example

The simplest code example that demonstrates how a remote distributed cache works.

Per cache configuration

Demonstrates how to configure caches dynamically when we connect to the Data Grid Server.

Near caches

Demonstrates how configure near caching to improve the read performance in remote caches.

Cache Admin API

Demonstrates how to use the Administration API to create caches and cache templates dynamically.

Encoding

Demonstrates how encoding of caches work.

Client listeners

Detect when data changes in a remote cache with Client Listeners.

Query

Demonstrates how to query remote cache values.

Continuous query

Demonstrates how to use Continuous Query and remote caches.

Transactions

Demonstrates how remote transactions work.

Secured caches

Demonstrates how to configure caches that have authorization enabled.

TLS authorization

Demonstrates how to connect to Data Grid Server with TLS authorization.

Counters

Demonstrates how remote counters work.

Multimap

Demonstrates how remote multimap works.

Task execution

Demonstrates how to register server tasks and how to execute them from the Hot Rod client.

JUnit 5 and Testcontainers

Demonstrates how to use the Data Grid and JUnit 5 extension.

Persistence

Demonstrates how to use the Data Grid and persistent caches.

Redis Client

Demonstrates how to use the Data Grid and Redis client to read and write using the Resp protocol.

Reactive API

Demonstrates how to use the Data Grid with the reactive API based on Mutiny.

Data Grid documentation

You can find more resources for Hot Rod Java clients in our documentation at:

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部