Interface RestCacheManagerClient

All Known Implementing Classes:
RestCacheManagerClientOkHttp

public interface RestCacheManagerClient
Since:
10.0
Author:
Tristan Tarrant <tristan@infinispan.org>
  • Method Details

    • name

      String name()
    • globalConfiguration

      default CompletionStage<RestResponse> globalConfiguration()
    • globalConfiguration

      CompletionStage<RestResponse> globalConfiguration(String mediaType)
    • cacheConfigurations

      CompletionStage<RestResponse> cacheConfigurations()
    • cacheConfigurations

      CompletionStage<RestResponse> cacheConfigurations(String mediaType)
    • info

    • health

      CompletionStage<RestResponse> health(boolean skipBody)
    • health

      default CompletionStage<RestResponse> health()
    • templates

      CompletionStage<RestResponse> templates(String mediaType)
    • healthStatus

      CompletionStage<RestResponse> healthStatus()
    • stats

    • backupStatuses

      CompletionStage<RestResponse> backupStatuses()
    • backupStatus

      CompletionStage<RestResponse> backupStatus(String site)
    • bringBackupOnline

      CompletionStage<RestResponse> bringBackupOnline(String backup)
    • takeOffline

      CompletionStage<RestResponse> takeOffline(String backup)
    • pushSiteState

      CompletionStage<RestResponse> pushSiteState(String backup)
    • cancelPushState

      CompletionStage<RestResponse> cancelPushState(String backup)
    • caches

    • createBackup

      default CompletionStage<RestResponse> createBackup(String name)
      Creates a backup file containing all resources in this container.
    • createBackup

      default CompletionStage<RestResponse> createBackup(String name, Map<String,List<String>> resources)
      Creates a backup file containing only the resources specified in the provided Map.
      Parameters:
      resources - a map of BackupManager.Resources.Type with the names of the resources to backup. If the provided list only contains "*" then all available resources of that type are backed up.
    • createBackup

      CompletionStage<RestResponse> createBackup(String name, String workingDir, Map<String,List<String>> resources)
      Creates a backup file containing only the resources specified in the provided Map.
      Parameters:
      workingDir - the path of the server directory to be used to create the backup content and store the final backup file. A null value indicates that the server default should be used.
      resources - a map of BackupManager.Resources.Type with the names of the resources to backup. If the provided list only contains "*" then all available resources of that type are backed up. A null value indicates that all resources should be included in the backup.
    • getBackup

      CompletionStage<RestResponse> getBackup(String name, boolean skipBody)
      Retrieves a backup file with the given name from the server.
      Parameters:
      name - the name of the backup.
      skipBody - if true, then a HEAD request is issued to the server and only the HTTP headers are returned.
    • getBackupNames

      CompletionStage<RestResponse> getBackupNames()
      Returns:
      the names of all backups.
    • deleteBackup

      CompletionStage<RestResponse> deleteBackup(String name)
      Deletes a backup file from the server.
      Parameters:
      name - the name of the backup.
    • restore

      default CompletionStage<RestResponse> restore(String name, File backup)
      Restores all content associated with this containers name contained within the provided backup file. The backup file is uploaded via the server endpoint for processing, returning once the restoration has completed.
      Parameters:
      name - a unique name to identify the restore request.
      backup - the backup File containing the data to be restored.
    • restore

      CompletionStage<RestResponse> restore(String name, File backup, Map<String,List<String>> resources)
      Restores the specified content from the backup file that's associated with this container's name.
      Parameters:
      name - a unique name to identify the restore request.
      backup - the backup File containing the data to be restored.
      resources - a map of BackupManager.Resources.Type with the names of the resources to backup. If the provided list only contains "*" then all available resources of that type are restored. A null value indicates that all resources in the backup should be restored.
    • restore

      CompletionStage<RestResponse> restore(String name, String backupLocation, Map<String,List<String>> resources)
      Restores the specified content from the backup file that's associated with this container's name.
      Parameters:
      name - a unique name to identify the restore request.
      backupLocation - the path of the backup file already located on the server.
      resources - a map of BackupManager.Resources.Type with the names of the resources to backup. If the provided list only contains "*" then all available resources of that type are restored. A null value indicates that all resources in the backup should be restored.
    • getRestore

      CompletionStage<RestResponse> getRestore(String name)
      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.
      Parameters:
      name - the name of the restore.
    • getRestoreNames

      CompletionStage<RestResponse> getRestoreNames()
      Returns:
      the names of all restores.
    • deleteRestore

      CompletionStage<RestResponse> deleteRestore(String name)
      Deletes a restore request from the server. Container content is not affected.
      Parameters:
      name - the name of the restore.
    • enableRebalancing

      CompletionStage<RestResponse> enableRebalancing()
      Globally enables automatic rebalancing.
    • disableRebalancing

      CompletionStage<RestResponse> disableRebalancing()
      Globally disables automatic rebalancing.