Questo contenuto non è disponibile nella lingua selezionata.

32.4. Running Remote Tasks


If authorization is disabled on the server then anyone may execute remote tasks once they have been installed. Otherwise, only users with EXEC permissions will be allowed to run previously installed tasks. If a remote task has additional users specified, via the getAllowedRole method, then users must also belong to this role to execute the script.
To execute a previously deployed task call execute(String taskName, Map parameters) on the desired cache. The following example demonstrates executing a task with the name sampleTask:
import org.infinispan.client.hotrod.*;
import java.util.*;
[...]
String TASK_NAME = "sampleTask";
 
RemoteCacheManager rcm = new RemoteCacheManager();
RemoteCache remoteCache = rcm.getCache();
 
// Assume the task takes a single parameter, and will return a result
Map<String, String> params = new HashMap<>();
params.put("name", "value");
 
String result = (String) remoteCache.execute(TASK_NAME, params);
Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat