![JAR search and dependency download from the Maven repository](/logo.png)
org.infinispan.client.rest.RestTaskClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-client-rest-jakarta Show documentation
Show all versions of infinispan-client-rest-jakarta Show documentation
Infinispan REST Client Jakarta
package org.infinispan.client.rest;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.CompletionStage;
/**
* @author Tristan Tarrant <[email protected]>
* @since 10.1
**/
public interface RestTaskClient {
/**
* Task type filter definition.
*/
enum ResultType {
/**
* User created tasks
*/
USER,
/**
* All tasks, including admin tasks, that contains name starting with '@@'
*/
ALL
}
/**
* Retrieves a list of tasks from the server
* @param resultType the type of task to return
*/
CompletionStage list(ResultType resultType);
/**
* Executes a task with the supplied parameters. Currently only supports String values
*/
CompletionStage exec(String taskName, String cacheName, Map parameters);
/**
* Uploads a script
*/
CompletionStage uploadScript(String taskName, RestEntity script);
/**
* Downloads a script
*/
CompletionStage downloadScript(String taskName);
/**
* Executes a task without parameters
*/
default CompletionStage exec(String taskName) {
return exec(taskName, null, Collections.emptyMap());
}
default CompletionStage exec(String taskName, Map parameters) {
return exec(taskName, null, parameters);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy