public class DummyNetworkDatabaseFacade extends NetworkDatabaseFacade
| Constructor and Description |
|---|
DummyNetworkDatabaseFacade(RouterContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void | accessLeaseSet(Hash key)Record access to a LeaseSet for refresh tracking. |
void | fail(Hash dbEntry)Record a lookup failure |
Set<Hash> | findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Return the RouterInfo structures for the routers closest to the given key. |
Set<Hash> | getAllRouters()All known router hashes. |
void | lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)Look up a destination using the client's tunnels. |
Destination | lookupDestinationLocally(Hash key)Look up a destination in the in-memory store. |
void | lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)Look up a lease set in the network database. |
void | lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels |
LeaseSet | lookupLeaseSetLocally(Hash key)Look up a LeaseSet in the local network database. |
void | lookupLeaseSetRemotely(Hash key,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
void | lookupLeaseSetRemotely(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
DatabaseEntry | lookupLocally(Hash key)Lookup a database entry locally. |
DatabaseEntry | lookupLocallyWithoutValidation(Hash key)Not for use without validation |
void | lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)Look up a router info in the network database. |
RouterInfo | lookupRouterInfoLocally(Hash key)Look up a router info in the in-memory store. |
void | publish(LeaseSet localLeaseSet)Publish a key to the network |
void | publish(RouterInfo localRouterInfo)Publish a key to the network |
void | removeLeaseSetFromTracking(Hash key)Remove a lease set from tracking |
void | restart()Restart the network database, retaining the in-memory store. |
void | shutdown()Shut down and release resources |
void | startup()Start the network database and register the local router info. |
LeaseSet | store(Hash key,
LeaseSet leaseSet)Store a key locally |
RouterInfo | store(Hash key,
RouterInfo routerInfo)Store a key locally |
void | unpublish(LeaseSet localLeaseSet)Remove a key from publication |
floodfillEnabled, getBlindData, getBlindData, getClientLeases, getFloodfillLeases, getKnownLeaseSets, getKnownRouters, getLastRouterInfoPublishTime, getLeases, getPublishedLeases, getRouters, getUnpublishedLeases, isInitialized, isNegativeCachedForever, purgeMatchingRouters, removeBlindData, renderStatusHTML, rescan, reseedChecker, routingKeyChanged, setBlindData, storepublic DummyNetworkDatabaseFacade(RouterContext ctx)
public void accessLeaseSet(Hash key)
NetworkDatabaseFacadeaccessLeaseSet in class NetworkDatabaseFacadepublic void fail(Hash dbEntry)
fail in class NetworkDatabaseFacadedbEntry - the key of the entry to failpublic Set<Hash> findNearestRouters(Hash key, int maxNumRouters, Set<Hash> peersToIgnore)
NetworkDatabaseFacadefindNearestRouters in class NetworkDatabaseFacadekey - The keymaxNumRouters - The maximum number of routers to returnpeersToIgnore - Hash of routers not to includepublic Set<Hash> getAllRouters()
NetworkDatabaseFacadegetAllRouters in class NetworkDatabaseFacadepublic void lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)
lookupDestination in class NetworkDatabaseFacadefromLocalDest - use these tunnels for the lookup, or null for exploratorypublic Destination lookupDestinationLocally(Hash key)
lookupDestinationLocally in class NetworkDatabaseFacadepublic void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
lookupLeaseSet in class NetworkDatabaseFacadekey - the keyonFindJob - job to run on successonFailedLookupJob - job to run on failuretimeoutMs - timeout in millisecondspublic void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)
NetworkDatabaseFacadelookupLeaseSet in class NetworkDatabaseFacadefromLocalDest - use these tunnels for the lookup, or null for exploratorypublic LeaseSet lookupLeaseSetLocally(Hash key)
NetworkDatabaseFacadelookupLeaseSetLocally in class NetworkDatabaseFacadekey - the keypublic void lookupLeaseSetRemotely(Hash key, Hash fromLocalDest)
NetworkDatabaseFacadelookupLeaseSetRemotely in class NetworkDatabaseFacadefromLocalDest - use these tunnels for the lookup, or null for exploratorypublic void lookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)
NetworkDatabaseFacadelookupLeaseSetRemotely in class NetworkDatabaseFacadeonFindJob - may be nullonFailedLookupJob - may be nullfromLocalDest - use these tunnels for the lookup, or null for exploratorypublic DatabaseEntry lookupLocally(Hash key)
NetworkDatabaseFacadelookupLocally in class NetworkDatabaseFacadekey - the keypublic DatabaseEntry lookupLocallyWithoutValidation(Hash key)
NetworkDatabaseFacadelookupLocallyWithoutValidation in class NetworkDatabaseFacadekey - the keypublic void lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
lookupRouterInfo in class NetworkDatabaseFacadekey - the keyonFindJob - job to run on successonFailedLookupJob - job to run on failuretimeoutMs - timeout in millisecondspublic RouterInfo lookupRouterInfoLocally(Hash key)
lookupRouterInfoLocally in class NetworkDatabaseFacadekey - the keypublic void publish(LeaseSet localLeaseSet)
publish in class NetworkDatabaseFacadelocalLeaseSet - the LeaseSet to publishpublic void publish(RouterInfo localRouterInfo)
publish in class NetworkDatabaseFacadelocalRouterInfo - the RouterInfo to publishpublic void removeLeaseSetFromTracking(Hash key)
removeLeaseSetFromTracking in class NetworkDatabaseFacadepublic void restart()
public void shutdown()
public void startup()
public LeaseSet store(Hash key, LeaseSet leaseSet)
store in class NetworkDatabaseFacadekey - the keyleaseSet - the LeaseSet to storepublic RouterInfo store(Hash key, RouterInfo routerInfo)
store in class NetworkDatabaseFacadekey - the keyrouterInfo - the RouterInfo to storepublic void unpublish(LeaseSet localLeaseSet)
unpublish in class NetworkDatabaseFacadelocalLeaseSet - the LeaseSet to unpublish