JournalWriter class

Applies batches of journal operations to one journal directory with synchronous file I/O: in the writer isolate in apps, inline in tests.

Operations (lists, so they cross isolates as plain data): ['h', header], ['c', checkpoint], ['e', firstSeq, events], ['l'] (the launch checkpoint no longer covers the session), ['r', launch?, periodic?, events] (rewrite everything), ['m', maxBytes] and ['x'] (delete the journal).

Constructors

JournalWriter(Directory dir, {required int maxBytes})

Properties

dir → Directory
final
hashCode → int
The hash code for this object.
no setterinherited
maxBytes ↔ int
At most this much on disk (2 × maxCapsuleBytes); past it the oldest events file goes, and the launch checkpoint with it.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stopped → bool
no setter
totalBytes → int
Bytes of checkpoints and events on disk.
no setter

Methods

apply(List<Object?> batch) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited