Closes the connection to persistent memory for the Raft node specified by
id
in the Raft cluster specified by cluster
. This function can be
used to release potential file locks before this Raft node shuts down. If
eraseAllData
is set to true, all persisted data is erased from
persistent memory before closing the connection.
Specifies whether or not to erase all persisted data.
Specifies the node for which the connection to persistent memory should be closed.
Specifies the cluster of the node for which the connection to persistent memory should be closed.
Promise that is resolved once the data has been erased (if specified) and the connection has been closed. Is rejected if an error occurred while accessing persistent memory.
Returns the data that is currently persisted for the given key
for the
Raft node specified by id
in the Raft cluster specified by cluster
.
That is the data that last was persisted using persistData()
.
Specifies the data that will be returned.
Specifies the node for which data should be returned.
Specifies the cluster of the node for which data should be returned.
Promise containing the currently persisted data for the given
key or null
if no such data was found. Is rejected if an error occurred
while accessing persistent memory.
Persists the provided data
for the given key
for the Raft node
specified by id
in the Raft cluster specified by cluster
. Existing
persisted data is overwritten.
The data that should be persisted. Is of type
RaftData
.
Can be used to retrieve the persisted data afterwards.
Specifies the node for which data should be persisted.
Specifies the cluster of the node for which data should be persisted.
Promise that is resolved after the data was persisted or rejected if an error occurred while accessing persistent memory.
Generated using TypeDoc
Interface used by Raft to persist data and retrieve it if necessary (e.g. after a crash).
Remark
Users can overwrite
getRaftPersistencyImplementation
to provide their own implementation of this interface if needed.