Package io.github.alexandrepiveteau.echo.core.log
Types
An interface describing a ChangeScope. A ChangeScope defines a scope that lets users push some new changes, which will then be stored in a log and reverted as needed.
A class representing an Event. This will typically be used when a function should return a complete event, as well as its associated identifier.
An interface defining an iterator over a MutableEventLog. Efficient, allocation-free methods for iteration are available, as well as an implementation of ListIterator which returns Event objects on each iteration.
A mutable variation of EventIterator, which may be used to mutate an underlying log of events.
A MutableEventLog is an implementation of EventLog optimized for consecutive insertions and removals at the same index; this works particularly well when many events are appended to the end of a MutableEventLog, or when two MutableEventLog are merged.
A MutableHistory is a high-performance log of serialized events, which aggregate the events into a current value which is incrementally computed from the linear sequence of events.
A MutableProjection applies events to a model of type T. When events are applied with the forward method, some changes may be generated and issued to the ChangeScope. These changes will then be made available when the backward method is called.
Functions
Returns true iff the EventIterator is empty.
Returns true iff there are no events in the EventLog.
Returns true iff the EventIterator is not empty.
Returns true iff there are some events in the EventLog.
Moves the EventIterator to the previous, while the predicate is valid.
Moves the EventIterator to its end, without allocations.
Moves the EventIterator to its start, without allocations.
Creates a new MutableEventLog, with no aggregate.
Creates a new MutableHistory, with an aggregate with an initial value and a projection for incremental changes.
Creates a new MutableEventLog, with no aggregate.
Returns a MutableEventLog copy of this EventLog.