INameDb

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()
                                       .getService(INameDb.class);

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.

@NotNull
IGeneralIdDatabase getGeneralIdDatabase();

Used to fetch a database for record IDs.

@NotNull
IRecordIdDatabase getRecordIdDatabase();

Used to fetch a database for result codes.

@NotNull
IResultCodeDatabase getResultCodeDatabase();

Used to fetch a database for target addresses.

@NotNull
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();

nyssr.net - Innovative Distributed System