This document is DEPRECATED.

Please consider any information here as out of date. DO NOT use this document.

Instead, refer to

Please update your bookmarks accordingly.

Skip to end of metadata
Go to start of metadata

Infinispan makes use of a command/visitor pattern to implement the various top-level methods you see on the public-facing API.  This is explained in further detail in the Architectural Overview on the Infinispan public wiki.  However, these commands - and their corresponding visitors - are hard-coded as a part of Infinispan's core module, making it impossible for module authors to extend and enhance Infinispan to create new arbitrary commands and visitors.

However, since Infinispan 5.0, this capability has now been added.  As a module author (such as infinispan-tree, infinispan-query, etc.) you can now define your own commands. From Infinispan 5.1 onwards, you do so by:

  1. Create a META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions file and ensure this is packaged in your jar.
  2. Implementing ModuleCommandFactory and ModuleCommandInitializer from infinispan-core.
  3. Implementing ModuleCommandExtensions from infinispan-core.
  4. Specifing the fully-qualified class name of the ModuleCommandExtensions implementation in META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions.
  5. Implement your custom commands and visitors for these commands

Here is an example of an META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions file, configured accordingly:

Code Snippet error: Unable to retrieve the URL: status code: 404.

For a full, working example of a sample module that makes use of custom commands and visitors, check out Infinispan Sample Module.

Preassigned Custom Command Id Ranges

This is the list of Command identifiers that are used by Infinispan based modules or frameworks. Infinispan users should avoid using ids within these ranges. (RANGES to be finalised yet!)
Being this a single byte, ranges can't be too large.

Infinispan Query: 100 - 119
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.