Package net.i2p.router.dummy
Class DummyNetworkDatabaseFacade
- java.lang.Object
-
- net.i2p.router.NetworkDatabaseFacade
-
- net.i2p.router.dummy.DummyNetworkDatabaseFacade
-
- All Implemented Interfaces:
Service
public class DummyNetworkDatabaseFacade extends NetworkDatabaseFacade
-
-
Constructor Summary
Constructors Constructor Description DummyNetworkDatabaseFacade(RouterContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfail(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()voidlookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)Lookup using the client's tunnels Succeeds even if LS validation fails due to unsupported sig typeDestinationlookupDestinationLocally(Hash key)Lookup locally in netDB and in badDest cache Succeeds even if LS validation failed due to unsupported sig typevoidlookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)voidlookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)Lookup using the client's tunnelsLeaseSetlookupLeaseSetLocally(Hash key)voidlookupLeaseSetRemotely(Hash key, Hash fromLocalDest)Unconditionally lookup using the client's tunnels.voidlookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)Unconditionally lookup using the client's tunnels.DatabaseEntrylookupLocally(Hash key)DatabaseEntrylookupLocallyWithoutValidation(Hash key)Not for use without validationvoidlookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)RouterInfolookupRouterInfoLocally(Hash key)voidpublish(LeaseSet localLeaseSet)voidpublish(RouterInfo localRouterInfo)voidrestart()Perform a soft restart.voidshutdown()Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.voidstartup()Instruct the service that it should start normal operation.LeaseSetstore(Hash key, LeaseSet leaseSet)RouterInfostore(Hash key, RouterInfo routerInfo)voidunpublish(LeaseSet localLeaseSet)-
Methods inherited from class net.i2p.router.NetworkDatabaseFacade
floodfillEnabled, getBlindData, getBlindData, getKnownLeaseSets, getKnownRouters, getLastRouterInfoPublishTime, getLeases, getRouters, isInitialized, isNegativeCachedForever, removeBlindData, renderStatusHTML, rescan, reseedChecker, routingKeyChanged, setBlindData, store
-
-
-
-
Constructor Detail
-
DummyNetworkDatabaseFacade
public DummyNetworkDatabaseFacade(RouterContext ctx)
-
-
Method Detail
-
restart
public void restart()
Description copied from interface:ServicePerform a soft restart.
-
shutdown
public void shutdown()
Description copied from interface:ServiceInstruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. It should not depend on other components at this point. This call DOES block.
-
startup
public void startup()
Description copied from interface:ServiceInstruct the service that it should start normal operation. This call DOES block until the service is ready.
-
lookupLocally
public DatabaseEntry lookupLocally(Hash key)
- Specified by:
lookupLocallyin classNetworkDatabaseFacade- Returns:
- RouterInfo, LeaseSet, or null
-
lookupLocallyWithoutValidation
public DatabaseEntry lookupLocallyWithoutValidation(Hash key)
Description copied from class:NetworkDatabaseFacadeNot for use without validation- Specified by:
lookupLocallyWithoutValidationin classNetworkDatabaseFacade- Returns:
- RouterInfo, LeaseSet, or null, NOT validated
-
lookupLeaseSet
public void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
- Specified by:
lookupLeaseSetin classNetworkDatabaseFacade
-
lookupLeaseSet
public void lookupLeaseSet(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)
Description copied from class:NetworkDatabaseFacadeLookup using the client's tunnels- Specified by:
lookupLeaseSetin classNetworkDatabaseFacadefromLocalDest- use these tunnels for the lookup, or null for exploratory
-
lookupLeaseSetLocally
public LeaseSet lookupLeaseSetLocally(Hash key)
- Specified by:
lookupLeaseSetLocallyin classNetworkDatabaseFacade
-
lookupLeaseSetRemotely
public void lookupLeaseSetRemotely(Hash key, Hash fromLocalDest)
Description copied from class:NetworkDatabaseFacadeUnconditionally lookup using the client's tunnels. No success or failed jobs, no local lookup, no checks. Use this to refresh a leaseset before expiration.- Specified by:
lookupLeaseSetRemotelyin classNetworkDatabaseFacadefromLocalDest- use these tunnels for the lookup, or null for exploratory
-
lookupLeaseSetRemotely
public void lookupLeaseSetRemotely(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs, Hash fromLocalDest)
Description copied from class:NetworkDatabaseFacadeUnconditionally lookup using the client's tunnels.- Specified by:
lookupLeaseSetRemotelyin classNetworkDatabaseFacadeonFindJob- may be nullonFailedLookupJob- may be nullfromLocalDest- use these tunnels for the lookup, or null for exploratory
-
lookupDestination
public void lookupDestination(Hash key, Job onFinishedJob, long timeoutMs, Hash fromLocalDest)
Description copied from class:NetworkDatabaseFacadeLookup using the client's tunnels Succeeds even if LS validation fails due to unsupported sig type- Specified by:
lookupDestinationin classNetworkDatabaseFacadefromLocalDest- use these tunnels for the lookup, or null for exploratory
-
lookupDestinationLocally
public Destination lookupDestinationLocally(Hash key)
Description copied from class:NetworkDatabaseFacadeLookup locally in netDB and in badDest cache Succeeds even if LS validation failed due to unsupported sig type- Specified by:
lookupDestinationLocallyin classNetworkDatabaseFacade
-
lookupRouterInfo
public void lookupRouterInfo(Hash key, Job onFindJob, Job onFailedLookupJob, long timeoutMs)
- Specified by:
lookupRouterInfoin classNetworkDatabaseFacade
-
lookupRouterInfoLocally
public RouterInfo lookupRouterInfoLocally(Hash key)
- Specified by:
lookupRouterInfoLocallyin classNetworkDatabaseFacade
-
publish
public void publish(LeaseSet localLeaseSet)
- Specified by:
publishin classNetworkDatabaseFacade
-
publish
public void publish(RouterInfo localRouterInfo)
- Specified by:
publishin classNetworkDatabaseFacade
-
store
public LeaseSet store(Hash key, LeaseSet leaseSet)
- Specified by:
storein classNetworkDatabaseFacade- Returns:
- the leaseSet if another leaseSet already existed at that key
-
store
public RouterInfo store(Hash key, RouterInfo routerInfo)
- Specified by:
storein classNetworkDatabaseFacade- Returns:
- the routerInfo if another router already existed at that key
-
unpublish
public void unpublish(LeaseSet localLeaseSet)
- Specified by:
unpublishin classNetworkDatabaseFacade
-
fail
public void fail(Hash dbEntry)
- Specified by:
failin classNetworkDatabaseFacade
-
getAllRouters
public Set<Hash> getAllRouters()
- Specified by:
getAllRoutersin classNetworkDatabaseFacade
-
findNearestRouters
public Set<Hash> findNearestRouters(Hash key, int maxNumRouters, Set<Hash> peersToIgnore)
Description copied from class:NetworkDatabaseFacadeReturn the RouterInfo structures for the routers closest to the given key. At most maxNumRouters will be returned- Specified by:
findNearestRoutersin classNetworkDatabaseFacade- Parameters:
key- The keymaxNumRouters- The maximum number of routers to returnpeersToIgnore- Hash of routers not to include
-
-