Ce contenu n'est pas disponible dans la langue sélectionnée.

7.3.2. Commands and Visitors


Internally, JBoss Cache uses a command/visitor pattern to execute API calls. Whenever a method is called on the cache interface, the CacheInvocationDelegate, which implements the Cache interface, creates an instance of VisitableCommand and dispatches this command up a chain of interceptors. Interceptors, which implement the Visitor interface, are able to handle VisitableCommands they are interested in, and add behavior to the command.
Each command contains all knowledge of the command being executed such as parameters used and processing behavior, encapsulated in a process() method. For example, the RemoveNodeCommand is created and passed up the interceptor chain when Cache.removeNode() is called, and RemoveNodeCommand.process() has the necessary knowledge of how to remove a node from the data structure.
In addition to being visitable, commands are also replicable. The JBoss Cache marshalers know how to efficiently marshal commands and invoke them on remote cache instances using an internal RPC mechanism based on JGroups.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat