put abstract method
Set the database entry for key
to value
.
If ensured
== true, the write will be flushed from the operating system
buffer cache before the write is considered complete.
If this flag is true, writes will be slower.
If this flag is false, and the machine crashes, some recent
writes may be lost. Note that if it is just the process that
crashes (i.e., the machine does not reboot), no writes will be
lost even if ensured
== false.
In other words, a DB write with ensured
== false has similar
crash semantics as the "write()" system call. A DB write
with ensured
== true has similar crash semantics to a "write()"
system call followed by "fsync()".
Implementation
void put(RawData key, RawData value, {bool ensured = false});