org.infinispan.client.rest.RestClusterClient 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
The newest version!
package org.infinispan.client.rest;
import java.io.File;
import java.util.List;
import java.util.concurrent.CompletionStage;
/**
* @author Tristan Tarrant <[email protected]>
* @since 10.0
**/
public interface RestClusterClient {
/**
* Shuts down the cluster
*/
CompletionStage stop();
/**
* Shuts down the specified servers
*/
CompletionStage stop(List server);
/**
* Creates a backup file containing the content of all containers in the cluster.
*
* @param name the name of the backup.
*/
CompletionStage createBackup(String name);
/**
* Retrieves a backup file with the given name from the server.
*
* @param name the name of the backup.
* @param skipBody if true, then a HEAD request is issued to the server and only the HTTP headers are returned.
*/
CompletionStage getBackup(String name, boolean skipBody);
/**
* @return the names of all backups.
*/
CompletionStage getBackupNames();
/**
* Deletes a backup file from the server.
*
* @param name the name of the backup.
*/
CompletionStage deleteBackup(String name);
/**
* Restores all content from a backup file, by uploading the file to the server endpoint for processing, returning
* once the restoration has completed.
*
* @param name a unique name to identify the restore request.
* @param backup the backup {@link File} containing the data to be restored.
*/
CompletionStage restore(String name, File backup);
/**
* Restores all content from a backup file available to the server instance.
*
* @param name a unique name to identify the restore request.
* @param backupLocation the path of the backup file already located on the server.
*/
CompletionStage restore(String name, String backupLocation);
/**
* Polls a restore request progress with the given name. 201 indicates that the request has completed, 202 that it's
* in progress and 404 that it can't be found.
*
* @param name the name of the restore.
*/
CompletionStage getRestore(String name);
/**
* @return the names of all restores.
*/
CompletionStage getRestoreNames();
/**
* Deletes a restore request from the server. Container content is not affected.
*
* @param name the name of the restore.
*/
CompletionStage deleteRestore(String name);
/**
* @return The cluster distribution information.
*/
CompletionStage distribution();
}