package cactus

  1. Overview
  2. Docs

Module Private.StoreSource

Sourceexception RandomFailure
Sourcetype t

The type for store handles.

Sourcetype address = int

The type of page addresses.

Sourcetype page

The type of pages.

Sourcemodule Common : sig ... end
Sourcemodule Page : sig ... end
Sourceval init : root:string -> t

init root opens a store at path root.

Sourceval root : t -> address

root t is the address of the root of the btree.

Sourceval reroot : t -> address -> unit

reroot s a changes the address of the root of s to a.

Sourceval load : t -> address -> page

load t a loads in memory the page at address a.

Sourceval reload : t -> address -> unit

reload t a moves a between caches. Called after a newly created page, it adds it to the right level of cache.

Sourceval release : t -> unit

release store tells the store that no loaded pages is going to be written on. This allows the store to clean part of the cache, and must be called as frequently as possible.

Sourceval clear_cache : t -> unit
Sourceval allocate : t -> address

allocate t allocates a new page (with junk contents) and returns the address of the new page.

Sourceval deallocate : t -> address -> unit

deallocate t a deallocates the page at the address a.

Sourceval flush : t -> unit
Sourceval fsync : t -> unit
Sourceval clear : t -> unit

clear t removes every binding in t.

Sourceval close : t -> unit
Sourceval iter : t -> (address -> page -> unit) -> unit

iter t f applies f on all alive pages in the btree.

Sourceval pp_header : t Fmt.t
Sourcemodule Private : sig ... end