Example #1
0
 /// <summary>
 /// Initializes a new restore instance
 /// </summary>
 /// <param name="archive">
 /// The SkyFloe archive for the restore
 /// </param>
 /// <param name="session">
 /// The restore session being processed
 /// </param>
 public GlacierRestore(GlacierArchive archive, Restore.Session session)
 {
     this.archive = archive;
      if (session.State == SkyFloe.Restore.SessionState.Pending)
     ScheduleRetrievals(session);
      this.downloader = new GlacierDownloader(
     this.archive.Glacier,
     this.archive.Vault
      );
      this.retrievalLimiter = new IO.RateLimiter(
     Math.Min(session.RateLimit, MaxRetrievalRate)
      );
 }
Example #2
0
 /// <summary>
 /// Releases the resources associated with the restore
 /// </summary>
 public void Dispose()
 {
     if (this.downloader != null)
     this.downloader.Dispose();
      this.downloader = null;
 }