/*
- * Sone - SoneRescuer.java - Copyright © 2011 David Roden
+ * Sone - SoneRescuer.java - Copyright © 2011–2013 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
package net.pterodactylus.sone.core;
+import net.pterodactylus.sone.data.LocalSone;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.util.service.AbstractService;
import freenet.keys.FreenetURI;
private final SoneDownloader soneDownloader;
/** The Sone being rescued. */
- private final Sone sone;
+ private final LocalSone sone;
/** Whether the rescuer is currently fetching a Sone. */
private volatile boolean fetching;
* @param sone
* The Sone to rescue
*/
- public SoneRescuer(Core core, SoneDownloader soneDownloader, Sone sone) {
+ public SoneRescuer(Core core, SoneDownloader soneDownloader, LocalSone sone) {
super("Sone Rescuer for " + sone.getName());
this.core = core;
this.soneDownloader = soneDownloader;
*
* @return {@code true} if the Sone rescuer is currently fetching a Sone
*/
+ @SuppressWarnings("unused") // used in rescue.html
public boolean isFetching() {
return fetching;
}
*
* @return The edition that is currently being downloaded
*/
+ @SuppressWarnings("unused") // used in rescue.html
public long getCurrentEdition() {
return currentEdition;
}
*
* @return The next edition the Sone rescuer can download
*/
+ @SuppressWarnings("unused") // used in rescue.html
public long getNextEdition() {
return currentEdition - 1;
}
* @return {@code true} if the last fetch was successful, {@code false}
* otherwise
*/
+ @SuppressWarnings("unused") // used in rescue.html
public boolean isLastFetchSuccessful() {
return lastFetchSuccessful;
}