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 void shutdown()
shutdown
in class SegmentedNetworkDatabaseFacade
public void startup()
startup
in class SegmentedNetworkDatabaseFacade
public NetworkDatabaseFacade mainNetDB()
mainNetDB
in class SegmentedNetworkDatabaseFacade
public NetworkDatabaseFacade clientNetDB(Hash id)
clientNetDB
in class SegmentedNetworkDatabaseFacade