Idris2Doc : Data.LSMRRBVector

Data.LSMRRBVector

(source)
Log-Structured Merge RRB Vector (LSMRRBVector)

Reexports

importpublic Data.LSMRRBVector.Internal
importpublic Data.LSMRRBVector.Types
importpublic Data.RRBVector

Definitions

append : LSMRRBVectorWorlda->RebuildServicePoll->ThreadId->a->AsyncPoll [Errno] ()
  Appends a value onto the logical end of the vector.

Effect:
- Adds an Append operation to the thread-local buffer.

Totality: total
Visibility: export
prepend : LSMRRBVectorWorlda->RebuildServicePoll->ThreadId->a->AsyncPoll [Errno] ()
  Prepends a value onto the logical beginning of the vector.

Effect:
- Adds a Prepend operation to the thread-local buffer.

Totality: total
Visibility: export
insert : LSMRRBVectorWorlda->RebuildServicePoll->ThreadId->Nat->a->AsyncPoll [Errno] ()
  Inserts a value at a specified logical index.

Effect:
- Adds an Insert operation to the thread-local buffer.

Totality: total
Visibility: export
delete : LSMRRBVectorWorlda->RebuildServicePoll->ThreadId->Nat->AsyncPoll [Errno] ()
  Removes a value at a specified logical index.

Effect:
- Adds a Delete operation to the thread-local buffer.

Totality: total
Visibility: export
update : LSMRRBVectorWorlda->RebuildServicePoll->ThreadId->Nat->a->AsyncPoll [Errno] ()
  Replaces a value at a specified logical index.

Effect:
- Adds an Update operation to the thread-local buffer.

Totality: total
Visibility: export
toList : LSMRRBVectorWorlda->ThreadId->IO (Lista)
  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: export
length : LSMRRBVectorWorlda->ThreadId->IONat
  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: export
index : LSMRRBVectorWorlda->ThreadId->Nat->IOa
  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: export
lookup : LSMRRBVectorWorlda->ThreadId->Nat->IO (Maybea)
  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: export
null : LSMRRBVectorWorlda->ThreadId->IOBool
  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: export
defaultconfig : LSMRRBVectorConfig
  Default log-structured merge vector configuration.

Current defaults favor balanced throughput and latency.

Totality: total
Visibility: export
runEmptyWith : Ord (Entrya) =>LSMRRBVectorConfig->List (LSMRRBVectorWorlda->RebuildServicePoll->RebuildServiceState->AsyncPoll [Errno] ()) ->List (LSMRRBVectorWorlda->AsyncPoll [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: export
runFastWritesEmpty : Ord (Entrya) =>List (LSMRRBVectorWorlda->RebuildServicePoll->RebuildServiceState->AsyncPoll [Errno] ()) ->List (LSMRRBVectorWorlda->AsyncPoll [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: export
runLowLatencyEmpty : Ord (Entrya) =>List (LSMRRBVectorWorlda->RebuildServicePoll->RebuildServiceState->AsyncPoll [Errno] ()) ->List (LSMRRBVectorWorlda->AsyncPoll [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: export
runEmpty : Ord (Entrya) =>List (LSMRRBVectorWorlda->RebuildServicePoll->RebuildServiceState->AsyncPoll [Errno] ()) ->List (LSMRRBVectorWorlda->AsyncPoll [Errno] ()) ->IO ()
  Runs an empty log-structured merge vector.

Visibility: export