Package com.atlassian.jira.rest.v2.index
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final long
-
Constructor Summary
ConstructorsConstructorDescriptionIndexSnapshotResource
(IndexSnapshotOperator indexSnapshotOperator, GlobalPermissionManager permissionManager, JiraAuthenticationContext authContext) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
Tries to start taking an index snapshot if no other snapshot creation process is in progress.javax.ws.rs.core.Response
Answers true if index snapshot creation is currently running.javax.ws.rs.core.Response
Lists available index snapshots absolute paths with timestamps.void
onClearCache
(ClearCacheEvent event)
-
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
-
IndexSnapshotResource
@Inject public IndexSnapshotResource(IndexSnapshotOperator indexSnapshotOperator, GlobalPermissionManager permissionManager, JiraAuthenticationContext authContext)
-
-
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
-