package index

  1. Overview
  2. Docs
A platform-agnostic multi-level index for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

index-1.3.2.tbz
sha256=0e46ebc785eb5b947bcb6e04075dda694d7e951c5ac51103e4d5fa5105df5d14
sha512=fd82ba852bb43eae8fefca2563d114bc2fa99e0ba98c828bccc2e81737a05156297b64b5894e2d0a58457a3382730a34e16cf16c844f8a6e6844c2684d79c7b5

doc/index/Index/index.html

Module IndexSource

Index

Index is a scalable implementation of persistent indices in OCaml.

Index provides the standard key-value interface: find, mem and replace. It requires three IO instances:

  • A `log` IO containing all of the recently-added bindings; this is also kept in memory.
  • When the `log` IO is full, it is merged into the `index` IO. Search is done first in `log` then in `index`, which makes recently added bindings search faster.
  • A `lock` IO to ensure safe concurrent access.
Sourcemodule Key : sig ... end
Sourcemodule Value : sig ... end
Sourcemodule type IO = sig ... end
Sourcemodule type SEMAPHORE = sig ... end

Binary semaphores for mutual exclusion

Sourcemodule type THREAD = sig ... end

Cooperative threads.

Sourcemodule Cache : sig ... end

Signatures and implementations of caches. Make requires a cache in order to provide instance sharing.

Sourcemodule type S = sig ... end

Index module signature.

Sourceexception RO_not_allowed

The exception raised when a write operation is attempted on a read_only index.

Sourceexception RW_not_allowed

The exception is raised when a sync operation is attempted on a read-write index.

Sourceexception Closed

The exception raised when any operation is attempted on a closed index, except for close, which is idempotent.

Sourcemodule Make (K : Key.S) (V : Value.S) (IO : IO) (_ : SEMAPHORE) (T : THREAD) (C : Cache.S) : S with type key = K.t and type value = V.t
Sourcemodule Stats : sig ... end

Run-time metric tracking for index instances.

Sourcemodule Checks : sig ... end

Offline integrity checking and recovery for Index stores.

Sourcemodule Private : sig ... end

These modules should not be used. They are exposed purely for testing purposes.

OCaml

Innovation. Community. Security.