aboutsummaryrefslogtreecommitdiff
path: root/src/database/database.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2020-04-15 08:01:11 +0200
committerGitHub <noreply@github.com>2020-04-15 08:01:11 +0200
commit5c588f89e79e02cba392abe3d00688772321f88b (patch)
treef88ba42459e55fa577668054fb06803af928f7d1 /src/database/database.h
parent62c62f382984bd1a6f5cd7c6edb00453ff758f9b (diff)
downloadminetest-5c588f89e79e02cba392abe3d00688772321f88b.tar.gz
minetest-5c588f89e79e02cba392abe3d00688772321f88b.tar.bz2
minetest-5c588f89e79e02cba392abe3d00688772321f88b.zip
Verify database connection on interval (#9665)
Diffstat (limited to 'src/database/database.h')
-rw-r--r--src/database/database.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/database/database.h b/src/database/database.h
index b7d551935..47605a07e 100644
--- a/src/database/database.h
+++ b/src/database/database.h
@@ -32,6 +32,7 @@ public:
virtual void beginSave() = 0;
virtual void endSave() = 0;
virtual bool initialized() const { return true; }
+ virtual void pingDatabase() {}
};
class MapDatabase : public Database
@@ -57,6 +58,8 @@ class PlayerDatabase
public:
virtual ~PlayerDatabase() = default;
+ virtual void pingDatabase() {}
+
virtual void savePlayer(RemotePlayer *player) = 0;
virtual bool loadPlayer(RemotePlayer *player, PlayerSAO *sao) = 0;
virtual bool removePlayer(const std::string &name) = 0;
@@ -83,4 +86,5 @@ public:
virtual bool deleteAuth(const std::string &name) = 0;
virtual void listNames(std::vector<std::string> &res) = 0;
virtual void reload() = 0;
+ virtual void pingDatabase() {}
};