Class IndexSnapshotResource

java.lang.Object
com.atlassian.jira.rest.v2.index.IndexSnapshotResource

@Consumes("application/json") @Produces("application/json") @Path("index-snapshot") public class IndexSnapshotResource extends Object
REST resource for index snapshot operations.
  • Field Details

    • IS_SNAPSHOT_RUNNING_RESPONSE_CACHE_TIME_IN_SECONDS

      public static final long IS_SNAPSHOT_RUNNING_RESPONSE_CACHE_TIME_IN_SECONDS
      See Also:
  • Constructor Details

  • Method Details

    • createIndexSnapshot

      @POST public javax.ws.rs.core.Response createIndexSnapshot()
      Tries to start taking an index snapshot if no other snapshot creation process is in progress. Performs a cleanup of index snapshots directory so only a limited number of most recent snapshots are persisted. If another snapshot creation process is in progress, returns 409 without waiting for the other process to complete.

      Only System Administrator can request creation of snapshot. There is no guarantee as to the time after which the snapshot will be available.

      Returns:
      future snapshot absolute path
    • listIndexSnapshot

      @GET public javax.ws.rs.core.Response listIndexSnapshot()
      Lists available index snapshots absolute paths with timestamps.

      Only System Administrator can request listing index snapshots.

      Returns:
      list of absolute paths to available index snapshots with their last modified date and time.
    • isIndexSnapshotRunning

      @GET @Path("isRunning") public javax.ws.rs.core.Response isIndexSnapshotRunning()
      Answers true if index snapshot creation is currently running.

      Only System Administrator can request current snapshot creation status.

      Returns:
      true if index snapshot creation is currently running.
    • onClearCache

      @EventListener public void onClearCache(ClearCacheEvent event)