public class ReseedChecker
extends java.lang.Object
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
MINIMUM |
コンストラクタ | 説明 |
---|---|
ReseedChecker(RouterContext context) |
All reseeding must be done through this instance.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
checkReseed(int count) |
Check if a reseed is needed, and start it
|
(package private) void |
done() |
The reseed is complete
|
java.lang.String |
getError() |
Error from last or current reseed attempt.
|
java.lang.String |
getStatus() |
Status from current reseed attempt,
probably empty if no reseed in progress.
|
boolean |
inProgress() |
.
|
boolean |
requestReseed() |
Start a reseed
|
int |
requestReseed(java.io.InputStream in) |
Reseed from a zip or su3 input stream.
|
boolean |
requestReseed(java.net.URI url) |
Start a reseed from a zip or su3 URI.
|
(package private) void |
setError(java.lang.String s) |
Status from last or current reseed attempt
|
(package private) void |
setStatus(java.lang.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 routers, includes uspublic boolean requestReseed()
public boolean requestReseed(java.net.URI url) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if it doesn't end with zip or su3public int requestReseed(java.io.InputStream in) throws java.io.IOException
java.io.IOException
- if already in progress or on most other errorspublic boolean inProgress()
void done()
public java.lang.String getStatus()
void setStatus(java.lang.String s)
s
- non-null, may be emptypublic java.lang.String getError()
void setError(java.lang.String s)
s
- non-null, may be empty