package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=d84fa343a841f663969ed6b08e5fc1b704d3ab7974858aa29471fe291a6a2f86
sha512=ab5eb4bd08ab69b97c8b9a72181c5b59d3d515e4ba63550d8a4551ec8ea72cd2d3b302fe0812379553e52891f81a9ae5d4d668382155d9c6c6eb75844a48477e
doc/irmin-pack.unix/Irmin_pack_unix/Pack_store/Maker/argument-1-Index/index.html
Parameter Maker.Index
include Index.S
with type value = Optint.Int63.t * int * Irmin_pack.Pack_value.Kind.t
type value = Optint.Int63.t * int * Irmin_pack.Pack_value.Kind.t
The type for values.
val empty_cache : unit -> cache
Construct a new empty cache of index instances.
val clear : t -> unit
clear t
clears t
so that there are no more bindings in it.
replace t k v
binds k
to v
in t
, replacing any existing binding of k
.
If overcommit
is true, the operation does not triger a merge, even if the caches are full. By default overcommit
is false.
filter t p
removes all the bindings (k, v) that do not satisfy p
. This operation is costly and blocking.
Iterates over the index bindings. Limitations:
- Order is not specified.
- In case of recent replacements of existing values (since the last merge), this will hit both the new and old bindings.
- May not observe recent concurrent updates to the index by other processes.
val flush : ?no_callback:unit -> ?with_fsync:bool -> t -> unit
Flushes all internal buffers of the IO
instances.
- Passing
~no_callback:()
disables calling theflush_callback
passed tov
. - If
with_fsync
istrue
, this also flushes the OS caches for eachIO
instance.
val sync : t -> unit
sync t
syncs a read-only index with the files on disk. Raises RW_not_allowed
if called by a read-write index.
val is_merging : t -> bool
is_merging t
returns true if t
is running a merge. Raises RO_not_allowed
if called by a read-only index.
val try_merge : t -> unit
try_merge
is like merge
but is a no-op if the number of entries in the write-ahead log is smaller than log_size
.
module Checks : sig ... end
Offline fsck
-like utility for checking the integrity of Index stores built using this module.
val v :
?flush_callback:(unit -> unit) ->
?fresh:bool ->
?readonly:bool ->
?throttle:[ `Block_writes | `Overcommit_memory ] ->
?lru_size:int ->
log_size:int ->
string ->
t
Constructor for indices, memoized by (path, readonly)
pairs.
val close : t -> unit
val merge : t -> unit
module Stats = Index.Stats