append : LSMRRBVector World a -> RebuildService Poll -> ThreadId -> a -> Async Poll [Errno] () Appends a value onto the logical end of the vector.
Effect:
- Adds an Append operation to the thread-local buffer.
Totality: total
Visibility: exportprepend : LSMRRBVector World a -> RebuildService Poll -> ThreadId -> a -> Async Poll [Errno] () Prepends a value onto the logical beginning of the vector.
Effect:
- Adds a Prepend operation to the thread-local buffer.
Totality: total
Visibility: exportinsert : LSMRRBVector World a -> RebuildService Poll -> ThreadId -> Nat -> a -> Async Poll [Errno] () Inserts a value at a specified logical index.
Effect:
- Adds an Insert operation to the thread-local buffer.
Totality: total
Visibility: exportdelete : LSMRRBVector World a -> RebuildService Poll -> ThreadId -> Nat -> Async Poll [Errno] () Removes a value at a specified logical index.
Effect:
- Adds a Delete operation to the thread-local buffer.
Totality: total
Visibility: exportupdate : LSMRRBVector World a -> RebuildService Poll -> ThreadId -> Nat -> a -> Async Poll [Errno] () Replaces a value at a specified logical index.
Effect:
- Adds an Update operation to the thread-local buffer.
Totality: total
Visibility: exporttoList : LSMRRBVector World a -> ThreadId -> IO (List a) Converts the current published snapshot into a list.
Behavior:
- Reads the current immutable snapshot.
- Converts the snapshot contents into a List.
Properties:
- Observes a consistent snapshot.
- Does not block writers or rebuild activity.
- Reader participation is cleaned up automatically.
Notes:
- Concurrent writes published after acquisition are not visible.
Complexity:
- Snapshot acquisition: O(1)
- Conversion: O(n)
Totality: total
Visibility: exportlength : LSMRRBVector World a -> ThreadId -> IO Nat Returns the number of elements in the current published snapshot.
Behavior:
- Reads the current immutable snapshot.
- Returns its logical length.
Properties:
- Observes a consistent snapshot.
- Does not block writers or rebuild activity.
- Reader participation is cleaned up automatically.
Notes:
- Concurrent writes published after acquisition are not visible.
Complexity:
- O(1)
Totality: total
Visibility: exportindex : LSMRRBVector World a -> ThreadId -> Nat -> IO a Returns the element at a given index.
Behavior:
- Reads the current immutable snapshot.
- Retrieves the element at the specified index.
Properties:
- Observes a consistent snapshot.
- Does not block writers or rebuild activity.
- Reader participation is cleaned up automatically.
Notes:
- Out-of-bounds behavior matches RRBVector.index.
- Concurrent writes published after acquisition are not visible.
Complexity:
- O(log n)
Totality: total
Visibility: exportlookup : LSMRRBVector World a -> ThreadId -> Nat -> IO (Maybe a) Looks up an element by index.
Behavior:
- Reads the current immutable snapshot.
- Returns Nothing if the index is out of bounds.
Properties:
- Observes a consistent snapshot.
- Does not block writers or rebuild activity.
- Reader participation is cleaned up automatically.
Notes:
- Concurrent writes published after acquisition are not visible.
Complexity:
- O(log n)
Totality: total
Visibility: exportnull : LSMRRBVector World a -> ThreadId -> IO Bool Tests whether the current published snapshot is empty.
Behavior:
- Reads the current immutable snapshot.
- Returns True when no elements exist.
Properties:
- Observes a consistent snapshot.
- Does not block writers or rebuild activity.
- Reader participation is cleaned up automatically.
Notes:
- Concurrent writes published after acquisition are not visible.
Complexity:
- O(1)
Totality: total
Visibility: exportdefaultconfig : LSMRRBVectorConfig Default log-structured merge vector configuration.
Current defaults favor balanced throughput and latency.
Totality: total
Visibility: exportrunEmptyWith : Ord (Entry a) => LSMRRBVectorConfig -> List (LSMRRBVector World a -> RebuildService Poll -> RebuildServiceState -> Async Poll [Errno] ()) -> List (LSMRRBVector World a -> Async Poll [Errno] ()) -> IO () Run an empty log-structured merge vector using a user-provided configuration.
Parameters:
- initialbatchwindow: Starting adaptive batching target.
Notes:
- Smaller values rebuild more aggressively.
- Larger values favor write throughput.
Visibility: exportrunFastWritesEmpty : Ord (Entry a) => List (LSMRRBVector World a -> RebuildService Poll -> RebuildServiceState -> Async Poll [Errno] ()) -> List (LSMRRBVector World a -> Async Poll [Errno] ()) -> IO () Runs an empty log-structured merge vector tuned for high sustained write throughput.
Configuration:
- Initial adaptive batch window: 512
Behavior:
- Favors larger rebuild batches.
- Reduces rebuild frequency under heavy write load.
- May increase visibility latency for newly written values.
Notes:
- Intended for write-heavy workloads.
Visibility: exportrunLowLatencyEmpty : Ord (Entry a) => List (LSMRRBVector World a -> RebuildService Poll -> RebuildServiceState -> Async Poll [Errno] ()) -> List (LSMRRBVector World a -> Async Poll [Errno] ()) -> IO () Runs an empty log-structured merge vector tuned for low publication latency.
Configuration:
- Initial adaptive batch window: 16
Behavior:
- Favors frequent rebuild cycles.
- Reduces time between writes and publication.
- May increase rebuild overhead under heavy load.
Notes:
- Intended for latency-sensitive workloads.
Visibility: exportrunEmpty : Ord (Entry a) => List (LSMRRBVector World a -> RebuildService Poll -> RebuildServiceState -> Async Poll [Errno] ()) -> List (LSMRRBVector World a -> Async Poll [Errno] ()) -> IO () Runs an empty log-structured merge vector.
Visibility: export