The name database is used to add readable names to IDs or addresses in the LOG. It consists of several sub-databases (actually rather maps) for looking up different IDs.

Get the database

The database is fetched as a singleton from the service registry:

final INameDb nameDb = CServiceRegistry.getInstance()

As always, make sure that the service starter of your package has a dependency on the INameDb to ensure that the database already exists.

Fetching the special databases

Used to fetch a database for general IDs.

IGeneralIdDatabase getGeneralIdDatabase();

Used to fetch a database for record IDs.

IRecordIdDatabase getRecordIdDatabase();

Used to fetch a database for result codes.

IResultCodeDatabase getResultCodeDatabase();

Used to fetch a database for target addresses.

ITargetAddressDatabase getTargetAddressDatabase();

Debug support

The following method outputs the contents of the database. On level INFO the output of the number of stored data sets is done. On level TRACE the output of all data records takes place. The logger has the name "de.sillysky.nyssr.namedb".

void dump(); - Innovative Distributed System