Este contenido no está disponible en el idioma seleccionado.
Chapter 23. Red Hat JBoss Data Grid CLIs
23.1. Red Hat JBoss Data Grid Library Mode CLI Copiar enlaceEnlace copiado en el portapapeles!
infinispan-cli-server-$VERSION.jar) includes an interpreter for commands and must be included in the application.
23.1.1. Start the Library Mode CLI (Server) Copiar enlaceEnlace copiado en el portapapeles!
standalone and cluster files. For Linux, use the standlaone.sh or clustered.sh script and for Windows, use the standalone.bat or clustered.bat file.
23.1.2. Start the Library Mode CLI (Client) Copiar enlaceEnlace copiado en el portapapeles!
cli files in the bin directory. For Linux, run bin/cli.sh and for Windows, run bin\cli.bat.
23.1.3. CLI Client Switches for the Command Line Copiar enlaceEnlace copiado en el portapapeles!
| Short Option | Long Option | Description |
|---|---|---|
| -c | --connect=${URL} | Connects to a running Red Hat JBoss Data Grid instance. For example, for JMX over RMI use jmx://[username[:password]]@host:port[/container[/cache]] and for JMX over JBoss Remoting use remoting://[username[:password]]@host:port[/container[/cache]] |
| -f | --file=${FILE} | Read the input from the specified file rather than using interactive mode. If the value is set to - then the stdin is used as the input. |
| -h | --help | Displays the help information. |
| -v | --version | Displays the CLI version information. |
23.1.4. Connect to the Application Copiar enlaceEnlace copiado en el portapapeles!
[disconnected//]> connect jmx://localhost:12000 [jmx://localhost:12000/MyCacheManager/>
[disconnected//]> connect jmx://localhost:12000
[jmx://localhost:12000/MyCacheManager/>
Note
12000 depends on the value the JVM is started with. For example, starting the JVM with the -Dcom.sun.management.jmxremote.port=12000 command line parameter uses this port, but otherwise a random port is chosen. When the remoting protocol (remoting://localhost:9999) is used, the Red Hat JBoss Data Grid server administration port is used (the default is port 9999).
CacheManager.
cache command to select a cache before performing cache operations. The CLI supports tab completion, therefore using the cache and pressing the tab button displays a list of active caches:
[[jmx://localhost:12000/MyCacheManager/> cache ___defaultcache namedCache [jmx://localhost:12000/MyCacheManager/]> cache ___defaultcache [jmx://localhost:12000/MyCacheManager/___defaultcache]>
[[jmx://localhost:12000/MyCacheManager/> cache
___defaultcache namedCache
[jmx://localhost:12000/MyCacheManager/]> cache ___defaultcache
[jmx://localhost:12000/MyCacheManager/___defaultcache]>
23.1.5. Stopping a Red Hat JBoss Data Grid Instance with the CLI Copiar enlaceEnlace copiado en el portapapeles!
When running a Red Hat JBoss Data Grid instance in a container as a library mode deployment, the life cycle of JBoss Data Grid is bound to the life cycle of the user deployment.
A remote client-server JBoss Data Grid instance can be stopped using the following script:
jboss-datagrid-{VERSION}-server/bin/init.d/jboss-datagrid.sh stop
jboss-datagrid-{VERSION}-server/bin/init.d/jboss-datagrid.sh stop
kill commands directly:
kill -15 $pid # send the TERM signal
kill -15 $pid # send the TERM signal
PID is still there, use the following:
kill -9 $pid
kill -9 $pid