Class FloodfillNetworkDatabaseSegmentor

java.lang.Object
net.i2p.router.networkdb.kademlia.SegmentedNetworkDatabaseFacade
net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseSegmentor

public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseFacade
FloodfillNetworkDatabaseSegmentor Default implementation of the SegmentedNetworkDatabaseFacade. This is a datastructure which manages (3+Clients) "sub-netDbs" on behalf of an I2P router, each representing it's own view of the network. Normally, these sub-netDb's are identified by the hash of the primary session belonging to the client who "owns" a particular sub-netDb. There is one "Special" netDb which has a non-hash name. This is used for the operation of router itself and not clients, in particular when acting as a floodfill: - Main NetDB: This is the netDb we use if or when we become a floodfill, and for direct interaction with other routers on the network, such as when we are communicating with a floodfill. It is possible that it may be advantageous some day to have other netDb's for specific use cases, but that is not the purpose of this class at this time. And there are an unlimited number of "Client" netDbs. These sub-netDbs are intended to contain only the information required to operate them, and as such most of them are very small, containing only a few LeaseSets belonging to clients. Each one corresponds to a Destination which can recieve information from the netDb, and can be indexed either by it's hash or by it's base32 address. This index is known as the 'dbid' or database id. Users of this class should strive to always access their sub-netDbs via the explicit DBID of the destination recipient, or using the DBID of the special netDb when it's appropriate to route the netDb entry to one of the special tables.
Since:
0.9.61
Author:
idk
  • Field Details

    • MAIN_DBID

      public static final Hash MAIN_DBID
  • Constructor Details

    • FloodfillNetworkDatabaseSegmentor

      public FloodfillNetworkDatabaseSegmentor(RouterContext context)
      Construct a new FloodfillNetworkDatabaseSegmentor with the given RouterContext, containing a default, main netDb and which is prepared to add client netDbs.
      Since:
      0.9.61
  • Method Details