Adds an update to the saved state for docID
.
Processes a checkpoint performed in response to a checkpointRequest
from addUpdate.
checkpoint
is guaranteed to be at least as up-to-date as the saved state
(previous checkpoint + uncompacted updates) at the end of the addUpdate
call that returned checkpointRequest
. So, it may replace any checkpoint
and uncompacted updates older than that call.
Implementer notes:
checkpointRequest
may be out-of-date, i.e., we have saved
a newer checkpoint since that request. In that case, this call should be ignored.checkpointRequest
is received over the network from a client and
should be validated.Returns the current saved state of docID
.
As described in the class header, this state consists of a checkpoint plus uncompacted updates.
The return value only needs to be up-to-date as of the time this call started, although it may be more up-to-date.
If there is no saved state for docID
, returns
{ checkpoint: null, updates: [], updateTypes: [] }
.
Generated using TypeDoc
Simple implementation of ServerDocStore for demonstration purposes.
It stores all of its documents in memory only, hence is not reliable. But you can use its source code for guidance when implementing a proper, persistent ServerDocStore.