haskey-0.2.0.0: A transactional, ACID compliant, embeddable key-value store.

Safe HaskellNone
LanguageHaskell2010

Database.Haskey.Alloc.Concurrent.FreePages.Tree

Description

Module describing the tree structure of the free page database.

Synopsis

Documentation

type FreeTree = Tree TxId FreeSubtree Source #

The main tree structure of the free page database.

The main free page database tree maps a TxId to a FreeSubtree.

type FreeSubtree = NonEmptyTree PageId () Source #

the subtree structure of the free page database.

Just a collection of free PageIds.

replaceSubtree :: AllocM m => TxId -> NonEmpty PageId -> FreeTree -> m FreeTree Source #

Replace the subtree of a certain TxId.

deleteSubtree :: AllocM m => TxId -> FreeTree -> m FreeTree Source #

Delete the subtree of a certain TxId.

The TxId will not be present anymore in the free tree after this call.

insertSubtree :: AllocM m => TxId -> NonEmpty PageId -> FreeTree -> m FreeTree Source #

Insert a subtree for a certain TxId.