JsonDurationStore

Keeps the learned durations in a JSON file in the node's hive (work-placement §WPS-6).

In the namespace batch. Declared in src/libs/libbatchservice/batchservice/JsonDurationStore.hpp.

Detailed description

The same primitive as `JsonBatchStore`: libstore's `SimpleDataStore`, in synchronous mode. A file of a newer schema is refused: `load` returns an empty record, and the store writes the file's own content back, so it never replaces a newer file.

Each write is the whole file, so writes are throttled as in `JsonBatchStore` (batch-persistence §BP-2.3): a change after a quiet interval is written at once, and the changes in the interval that follows are written together when it ends. The destructor writes what is left.

In this section