net.i2p.router
public abstract class NetworkDatabaseFacade extends Object implements Service
Constructor and Description |
---|
NetworkDatabaseFacade() |
Modifier and Type | Method and Description |
---|---|
abstract void |
fail(Hash dbEntry) |
abstract Set<Hash> |
findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)
Return the RouterInfo structures for the routers closest to the given key.
|
abstract Set<Hash> |
getAllRouters() |
int |
getKnownLeaseSets() |
int |
getKnownRouters() |
Set<LeaseSet> |
getLeases()
public for NetDbRenderer in routerconsole
|
Set<RouterInfo> |
getRouters()
public for NetDbRenderer in routerconsole
|
boolean |
isInitialized() |
abstract void |
lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
abstract LeaseSet |
lookupLeaseSetLocally(Hash key) |
abstract DatabaseEntry |
lookupLocally(Hash key) |
abstract void |
lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
abstract RouterInfo |
lookupRouterInfoLocally(Hash key) |
abstract void |
publish(LeaseSet localLeaseSet) |
abstract void |
publish(RouterInfo localRouterInfo) |
void |
renderStatusHTML(Writer out)
Deprecated.
moved to router console
|
void |
rescan() |
abstract LeaseSet |
store(Hash key,
LeaseSet leaseSet)
return the leaseSet if another leaseSet already existed at that key
|
abstract RouterInfo |
store(Hash key,
RouterInfo routerInfo)
return the routerInfo if another router already existed at that key
|
abstract void |
unpublish(LeaseSet localLeaseSet) |
public abstract Set<Hash> findNearestRouters(Hash key, int maxNumRouters, Set<Hash> peersToIgnore)
key
- The keymaxNumRouters
- The maximum number of routers to returnpeersToIgnore
- Hash of routers not to includepublic abstract DatabaseEntry lookupLocally(Hash key)
public abstract void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
public abstract void lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
public abstract RouterInfo lookupRouterInfoLocally(Hash key)
public abstract LeaseSet store(Hash key, LeaseSet leaseSet) throws IllegalArgumentException
IllegalArgumentException
- if the data is not validpublic abstract RouterInfo store(Hash key, RouterInfo routerInfo) throws IllegalArgumentException
IllegalArgumentException
- if the data is not validpublic abstract void publish(RouterInfo localRouterInfo) throws IllegalArgumentException
IllegalArgumentException
- if the local router is not validpublic abstract void publish(LeaseSet localLeaseSet)
public abstract void unpublish(LeaseSet localLeaseSet)
public abstract void fail(Hash dbEntry)
public int getKnownRouters()
public int getKnownLeaseSets()
public boolean isInitialized()
public void rescan()
public void renderStatusHTML(Writer out) throws IOException
renderStatusHTML
in interface Service
IOException
public Set<RouterInfo> getRouters()