Este contenido no está disponible en el idioma seleccionado.

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.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2026 Red Hat