Data Pool

The data pool is something like the registry for Windows. It consists of a SQL database containing key value pairs. As in the Windows registry, the key consists of a path and the key:

Path/Key=Value

Global Data Pool

There is a global data pool which can be accessed via the kernel:

getKernel().getDatapool();

Data in the data pool is persistent; it is stored in the database file and is available again when the NODE is restarted.

The configuration data is automatically saved in the data pool and is immediately available there.

Local Data Pool

Each namespace can optionally have its own data pool.

To load the local datapool at startup, an entry in the configuration is necessary:

namespaces/{{NamespaceID}}/datapool = true

The SQL database file is created in the same directory as the configuration. The file name is:

Namespace{{NamespaceID}}.mv.db

A separate datapool is particularly useful for applications, since data can be stored there in a collision-proof manner.

The namespace data pool can be accessed using the following method of the namespace:

IDatapool getDatapool();

Reading the Data Pool With Another Tool

You can also read and change the values in the data pool with other tools. An example is the SQLWorkBench, with which the H2 database can be easily processed. Use the H2 driver (org. h2. Driver), a JDBC URL (jdbc: h2: c: pathdatapool), the default username (sa) and an empty password. Do not forget to save changes.