module Seqdb_fsys_ao:Append-only (ao) filesys variantsig..end
open_file_wr is only permitted with new file names so that a new
file must be created.write_file is only permitted
if the file is still the last one.file_mtime reflects the time of creating the file, not the last
modification.set_file_mtime is forbiddentruncate is forbiddenreserve is a no-opdelete_file and
delete_name_from_index work for all files.rename_file restricts the length of the new name: it is not allowed
that the name is so long that a bigger inode must be allocated.Seqdb_fsys_ht. Do this by calling the init function below.
So Seqdb_fsys_ht.ht_base is also used to keep handles for the ao variants.
By calling Seqdb_fsys_ht.get_filesys you simply get the ao variant. All
the other functions also work, except:
Seqdb_fsys_ht.create_filesys cannot create the ao variant. Use
the create_ao_filesys function below instead.Seqdb_fsys_ht.get_iterator works, but iteration starts always at
the beginning. Use get_ao_iterator below for starting at any
mtime.Seqdb_fsys_ht.get_idx_iterator works, but iteration starts always at
the beginning. There is no ao counterpart with more possibilities.type ao_params = {
|
ao_time_mark_period : |
(* | TIMEMP in seconds | *) |
exception Append_only_restriction of string
val init : unit -> unitSeqdb_fsys_ht in a special way so the ao variant is known
thereval create_ao_filesys : Seqdb_fsys_ht.ht_base ->
string ->
Seqdb_fsys_ht.params ->
ao_params ->
Seqdb_fsys_ht.ht_file_descr Seqdb_fsys_types.file_systemval filesys_ao_params : Seqdb_fsys_ht.ht_base -> string -> ao_paramsval configure_ao_filesys : ?read_only_mode:bool -> Seqdb_fsys_ht.ht_base -> string -> unitread_only_mode: If true, the fsys can only be read - writes will fail.
The advantage is that the fsys lock can be quicker released.val get_ao_iterator : ?at_mtime:int64 ->
Seqdb_fsys_ht.ht_base ->
string -> Seqdb_fsys_ht.ht_file_descr Seqdb_fsys_types.file_system_iteratormtime is greater or equal
to at_mtime (or the beginning of the filesys if at_mtime is omitted).