The latest version of the specification is version v2.

Record

A record is an entry, element of the latest snapshot.

record : ID -> Snapshot -> Maybe Entry

null

A record MAY also be computed from the log by a similar method of computing a snapshot.

record : ID -> Log -> Maybe Entry

The algorithm:

  1. Let key be the identifier for the record to find.

  2. Let log be the full log to parse.

  3. Let result be null.

  4. Foreach entry in log:

    1. If the entry key equals key, set entry to result.

      Otherwise, do nothing.

After all entries in the log have been inspected, the latest one stored in result is the record. If no entries were found for key, the record doesn't exist in the Register.

null

© Crown copyright released under the Open Government Licence.