public class ReseedChecker extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MINIMUM |
Constructor and Description |
---|
ReseedChecker(RouterContext context)
All reseeding must be done through this instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkReseed(int count)
Check if a reseed is needed, and start it
|
(package private) void |
done()
The reseed is complete
|
String |
getError()
Error from last or current reseed attempt.
|
String |
getStatus()
Status from current reseed attempt,
probably empty if no reseed in progress.
|
boolean |
inProgress()
.
|
boolean |
requestReseed()
Start a reseed
|
int |
requestReseed(InputStream in)
Reseed from a zip or su3 input stream.
|
boolean |
requestReseed(URI url)
Start a reseed from a zip or su3 URI.
|
(package private) void |
setError(String s)
Status from last or current reseed attempt
|
(package private) void |
setStatus(String s)
Status from current reseed attempt
|
public static final int MINIMUM
public ReseedChecker(RouterContext context)
public boolean checkReseed(int count)
count
- current number of known routerspublic boolean requestReseed()
public boolean requestReseed(URI url) throws IllegalArgumentException
IllegalArgumentException
- if it doesn't end with zip or su3public int requestReseed(InputStream in) throws IOException
IOException
- if already in progress or on most other errorspublic boolean inProgress()
void done()
public String getStatus()
void setStatus(String s)
s
- non-null, may be emptypublic String getError()
void setError(String s)
s
- non-null, may be empty