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

Chapter 3. Performing Batch Operations


Process operations in groups, either interactively or using batch files.

Prerequisites

  • A running Data Grid cluster.

3.1. Performing Batch Operations with Files

Create files that contain a set of operations and then pass them to the Data Grid CLI.

Procedure

  1. Create a file that contains a set of operations.

    For example, create a file named batch that creates a cache named mybatch, adds two entries to the cache, and disconnects from the CLI.

    connect --username=<username> --password=<password> <hostname>:11222
    create cache --template=org.infinispan.DIST_SYNC mybatch
    put --cache=mybatch hello world
    put --cache=mybatch hola mundo
    ls caches/mybatch
    disconnect
    Copy to Clipboard Toggle word wrap
    Tip

    Configure the CLI with the autoconnect-url property instead of using the connect command directly in your batch files.

  2. Run the CLI and specify the file as input.

    bin/cli.sh -f batch
    Copy to Clipboard Toggle word wrap
Note

CLI batch files support system property expansion. Strings that use the ${property} format are replaced with the value of the property system property.

3.2. Performing Batch Operations Interactively

Use the standard input stream, stdin, to perform batch operations interactively.

Procedure

  1. Start the Data Grid CLI in interactive mode.

    bin/cli.sh -c localhost:11222 -f -
    Copy to Clipboard Toggle word wrap
    Tip

    You can configure the CLI connection with the autoconnect-url property instead of using the -c argument.

  2. Run batch operations, for example:

    create cache --template=org.infinispan.DIST_SYNC mybatch
    put --cache=mybatch hello world
    put --cache=mybatch hola mundo
    disconnect
    quit
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat