QcSaveSchedule Class
When the server saves on its own: autosaves and the identities of new players. More...
| Header: | #include <server/core/QcSaveSchedule.h> |
Public Functions
| void | autosave() |
| quint64 | autosaveCount() const |
| void | flushIdentities() |
| void | flushIdentitiesWhenDue() |
| void | saveBeforePause() |
Detailed Description
Both count in the players' time (QcServerClock::playerTimeNs), so neither a high tick rate nor a sprint saves more often (decision E-249).
Member Function Documentation
void QcSaveSchedule::autosave()
Tells everyone about a new failure of a background save, then starts an autosave when the interval has passed or many unloaded chunks wait (decision E-374); one save runs at a time.
quint64 QcSaveSchedule::autosaveCount() const
Returns the autosaves since the server started, saves before a pause included.
void QcSaveSchedule::flushIdentities()
Writes identities.json now; failures are logged by the store.
void QcSaveSchedule::flushIdentitiesWhenDue()
Writes identities.json when players registered and the last write is a second ago (decision E-273).
void QcSaveSchedule::saveBeforePause()
Starts a save in the background like an autosave unless one runs: the server is empty and pauses (decision E-877).