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()Get all known router hashes. |
void | lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)lookupDestination. |
Destination | lookupDestinationLocally(Hash key)lookupDestinationLocally. |
void | lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)lookupLeaseSet. |
void | lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels |
LeaseSet | lookupLeaseSetLocally(Hash key)key). |
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)lookupRouterInfo. |
RouterInfo | lookupRouterInfoLocally(Hash key)lookupRouterInfoLocally. |
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. |
void | shutdown()Shut down and release resources |
void | startup()startup. |
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 NetworkDatabaseFacadepublic 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 NetworkDatabaseFacadepublic RouterInfo lookupRouterInfoLocally(Hash key)
lookupRouterInfoLocally in class NetworkDatabaseFacadepublic 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 NetworkDatabaseFacadepublic RouterInfo store(Hash key, RouterInfo routerInfo)
store in class NetworkDatabaseFacadepublic void unpublish(LeaseSet localLeaseSet)
unpublish in class NetworkDatabaseFacadelocalLeaseSet - the LeaseSet to unpublish