|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.networkdb.reseed.ReseedChecker
public class ReseedChecker
Moved from RouterConsoleRunner.java Reseeding is not strictly a router function, it used to be in the routerconsole app, but this made it impossible to bootstrap an embedded router lacking a routerconsole, in iMule or android for example, without additional modifications. Also, as this is now called from PersistentDataStore, not from the routerconsole, we can get started as soon as the netdb has read the netDb/ directory, not when the console starts.
Field Summary | |
---|---|
static int |
MINIMUM
|
Constructor Summary | |
---|---|
ReseedChecker(RouterContext context)
All reseeding must be done through this instance. |
Method Summary | |
---|---|
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()
Is a reseed in progress? |
boolean |
requestReseed()
Start a reseed |
(package private) void |
setError(String s)
Status from last or current reseed attempt |
(package private) void |
setStatus(String s)
Status from current reseed attempt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MINIMUM
Constructor Detail |
---|
public ReseedChecker(RouterContext context)
Method Detail |
---|
public boolean checkReseed(int count)
count
- current number of known routers
public boolean requestReseed()
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |