public class FloodfillNetworkDatabaseSegmentor extends SegmentedNetworkDatabaseFacade
| Constructor and Description |
|---|
FloodfillNetworkDatabaseSegmentor(RouterContext context)Construct a new FloodfillNetworkDatabaseSegmentor with the given
RouterContext, containing a default, main netDb
and which is prepared to add client netDbs. |
| Modifier and Type | Method and Description |
|---|---|
NetworkDatabaseFacade | clientNetDB(Hash id)get the client netDb for the given id
Will return the "main" netDb if
the dbid is null. |
NetworkDatabaseFacade | mainNetDB()get the main netDb, which is the one we will use if we are a floodfill |
void | shutdown()If we are floodfill, turn it off and tell everybody for the _mainDbid |
void | startup()Start up the _mainDbid |
public static final Hash MAIN_DBID
public FloodfillNetworkDatabaseSegmentor(RouterContext context)
public NetworkDatabaseFacade clientNetDB(Hash id)
clientNetDB in class SegmentedNetworkDatabaseFacadepublic NetworkDatabaseFacade mainNetDB()
mainNetDB in class SegmentedNetworkDatabaseFacadepublic void shutdown()
shutdown in class SegmentedNetworkDatabaseFacadepublic void startup()
startup in class SegmentedNetworkDatabaseFacade