Journals and Diagnostics

0 views
Skip to first unread message

William la Forge

unread,
Dec 10, 2009, 8:31:44 AM12/10/09
to AgileWikiDevelopers
Some things are more efficiently handled in the kernel than in the core, which is a good justification for implementing them in the core. A case in point is journals.

The Timestamps element under the kernel root element maintains 2 indexes:
  1. The timestamps for every journal entry and
  2. The timestamps for the journal entries of every rolon.
Later we will add an inverse index which gives us the UUIDs of all the rolons effected by a given journal entry.

The API for the TransactionContexts also has two iterator methods:
  1. journalEntryTimestampIterator - iterates over all journal entries and
  2. journalEntryTimestampIterator(uuid) - iterates over the journal entries for a given rolon.
A getJournalEntry(timestamp) method has also been added to TransactionContexts to provide a means of accessing a JournalEntry rolon, given its timestamp, though this is really just a convenience method over get(uuid) that simply inverts the timestamp.

There is also a new class, Diagnostics, which provides various methods for printing the contents and attributes of an element and for printing journals. It nicely demonstrates how to use the Kernel API, or at least some of it.

Bill
Reply all
Reply to author
Forward
0 new messages