public class DummyNetworkDatabaseFacade extends NetworkDatabaseFacade
Constructor and Description |
---|
DummyNetworkDatabaseFacade(RouterContext ctx) |
Modifier and Type | Method and Description |
---|---|
void |
fail(Hash dbEntry) |
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() |
void |
lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)
Lookup using the client's tunnels
Succeeds even if LS validation fails due to unsupported sig type
|
Destination |
lookupDestinationLocally(Hash key)
Lookup locally in netDB and in badDest cache
Succeeds even if LS validation failed due to unsupported sig type
|
void |
lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
void |
lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)
Lookup using the client's tunnels
|
LeaseSet |
lookupLeaseSetLocally(Hash key) |
void |
lookupLeaseSetRemotely(Hash key,
Hash fromLocalDest)
Unconditionally lookup using the client's tunnels.
|
DatabaseEntry |
lookupLocally(Hash key) |
void |
lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
RouterInfo |
lookupRouterInfoLocally(Hash key) |
void |
publish(LeaseSet localLeaseSet) |
void |
publish(RouterInfo localRouterInfo) |
void |
restart()
Perform a soft restart.
|
void |
shutdown()
Instruct the service that the router is shutting down and that it should do
whatever is necessary to go down gracefully.
|
void |
startup()
Instruct the service that it should start normal operation.
|
LeaseSet |
store(Hash key,
LeaseSet leaseSet) |
RouterInfo |
store(Hash key,
RouterInfo routerInfo) |
void |
unpublish(LeaseSet localLeaseSet) |
floodfillEnabled, getKnownLeaseSets, getKnownRouters, getLastRouterInfoPublishTime, getLeases, getRouters, isInitialized, isNegativeCachedForever, renderStatusHTML, rescan, reseedChecker, store
public DummyNetworkDatabaseFacade(RouterContext ctx)
public void restart()
Service
public void shutdown()
Service
public void startup()
Service
public DatabaseEntry lookupLocally(Hash key)
lookupLocally
in class NetworkDatabaseFacade
public void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
lookupLeaseSet
in class NetworkDatabaseFacade
public void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)
NetworkDatabaseFacade
lookupLeaseSet
in class NetworkDatabaseFacade
fromLocalDest
- use these tunnels for the lookup, or null for exploratorypublic LeaseSet lookupLeaseSetLocally(Hash key)
lookupLeaseSetLocally
in class NetworkDatabaseFacade
public void lookupLeaseSetRemotely(Hash key, Hash fromLocalDest)
NetworkDatabaseFacade
lookupLeaseSetRemotely
in class NetworkDatabaseFacade
fromLocalDest
- use these tunnels for the lookup, or null for exploratorypublic void lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)
NetworkDatabaseFacade
lookupDestination
in class NetworkDatabaseFacade
fromLocalDest
- use these tunnels for the lookup, or null for exploratorypublic Destination lookupDestinationLocally(Hash key)
NetworkDatabaseFacade
lookupDestinationLocally
in class NetworkDatabaseFacade
public void lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
lookupRouterInfo
in class NetworkDatabaseFacade
public RouterInfo lookupRouterInfoLocally(Hash key)
lookupRouterInfoLocally
in class NetworkDatabaseFacade
public void publish(LeaseSet localLeaseSet)
publish
in class NetworkDatabaseFacade
public void publish(RouterInfo localRouterInfo)
publish
in class NetworkDatabaseFacade
public LeaseSet store(Hash key, LeaseSet leaseSet)
store
in class NetworkDatabaseFacade
public RouterInfo store(Hash key, RouterInfo routerInfo)
store
in class NetworkDatabaseFacade
public void unpublish(LeaseSet localLeaseSet)
unpublish
in class NetworkDatabaseFacade
public void fail(Hash dbEntry)
fail
in class NetworkDatabaseFacade
public Set<Hash> getAllRouters()
getAllRouters
in class NetworkDatabaseFacade
public Set<Hash> findNearestRouters(Hash key, int maxNumRouters, Set<Hash> peersToIgnore)
NetworkDatabaseFacade
findNearestRouters
in class NetworkDatabaseFacade
key
- The keymaxNumRouters
- The maximum number of routers to returnpeersToIgnore
- Hash of routers not to include