Module Tjr_btree.Btree_intf

A collection of the main interfaces. This should be read first.

NOTE that this uses some terminology established in package isa_btree.

type ('dnode, 'blk) dnode_mshlr = {
dnode_to_blk : 'dnode -> 'blk;
blk_to_dnode : 'blk -> 'dnode;
blk_sz : Tjr_fs_shared.blk_sz;
}

A type for recording the marshalling functions

type ('k, 'v, 'r, 'node, 'leaf) node_cnvs = {
node_to_krs : 'node -> 'k list * 'r list;
krs_to_node : ('k list * 'r list) -> 'node;
leaf_to_kvs : 'leaf -> ('k * 'v) list;
kvs_to_leaf : ('k * 'v) list -> 'leaf;
}

It is common for marshalling to go via a representation using lists. This allows us to assume little about node and leaf implementations. These fields have the same names and types as the corresponding fields in node_ops and leaf_ops.

type ('r, 't) btree_root_ops = ('r't) Tjr_monad.with_state

Btree root; just an int/blk_id

module Map_ops_with_ls : sig ... end

As map ops, but with leaf_stream operations

type ('k, 'v, 'r, 'ls, 't) map_ops_with_ls = ('k'v'r'ls't) Map_ops_with_ls.map_ops_with_ls
module Disk_ops_type : sig ... end
include Disk_ops_type
type ('r, 't, 'dnode, 'blk) disk_ops = {
dnode_mshlr : ('dnode'blk) dnode_mshlr;
blk_dev_ops : ('r'blk't) Tjr_fs_shared.blk_dev_ops;
blk_alloc : ('r't) Tjr_fs_shared.blk_allocator_ops;
}

A collection of block-based interfaces

Class interfaces

type finished = {
finished : bool;
}
class type ['k, 'v, 't] ls = object ... end
val ls2object : monad_ops:'a Tjr_monad.monad_ops -> leaf_stream_ops:('b'c'd'e'a) Isa_btree.Isa_btree_intf.leaf_stream_ops -> get_r:(unit -> ('d'a) Tjr_monad.m) -> unit -> (('b'c'a) ls'a) Tjr_monad.m

Convert a standard ls to a class interface

class type ['k, 'v, 't] uncached_btree = object ... end

NOTE uncached here means "no write back cache"; a read cache is not observable except for performance and memory usage

For Make_5

type ('a, 't) with_btree_root = ('a't) Tjr_monad.with_state