Class CreateSnapshotTaskRunner

  • All Implemented Interfaces:
    TaskRunner

    public class CreateSnapshotTaskRunner
    extends SpaceModifyingSnapshotTaskRunner
    Begins the process of creating a snapshot by collecting the necessary information and passing it down to the snapshot bridge application. Along the way, the space provided is also set to read-only so that changes cannot be made to the content.
    • Method Detail

      • getName

        public String getName()
      • performTask

        public String performTask​(String taskParameters)
      • generateSnapshotId

        protected String generateSnapshotId​(String spaceId,
                                            long timestamp)
      • buildSnapshotURL

        protected String buildSnapshotURL​(String snapshotId)
      • buildSnapshotProps

        protected String buildSnapshotProps​(Map<String,​String> props)
        Constructs the contents of a properties file given a set of key/value pairs
        Parameters:
        props - snapshot properties
        Returns:
        Properties-file formatted key/value pairs
      • snapshotExists

        protected boolean snapshotExists​(RestHttpHelper restHelper,
                                         String snapshotURL)
        Attempts to retrieve details about the snapshot, primarily to determine if it was created properly
        Returns:
        true if 200 response, false otherwise