Luanti 5.16.0-dev
Loading...
Searching...
No Matches
Database_Redis Class Reference

#include <database-redis.h>

Inheritance diagram for Database_Redis:
Collaboration diagram for Database_Redis:

Public Member Functions

 Database_Redis (Settings &conf)
 ~Database_Redis ()
void beginSave ()
void endSave ()
bool saveBlock (const v3s16 &pos, std::string_view data)
void loadBlock (const v3s16 &pos, std::string *block)
bool deleteBlock (const v3s16 &pos)
void listAllLoadableBlocks (std::vector< v3s16 > &dst)
Public Member Functions inherited from MapDatabase
virtual ~MapDatabase ()=default
Public Member Functions inherited from Database
virtual bool initialized () const
virtual void verifyDatabase ()
 Open and initialize the database if needed.

Private Attributes

redisContext * ctx = nullptr
std::string hash = ""

Additional Inherited Members

Static Public Member Functions inherited from MapDatabase
static s64 getBlockAsInteger (const v3s16 &pos)
static v3s16 getIntegerAsBlock (s64 i)

Constructor & Destructor Documentation

◆ Database_Redis()

Database_Redis::Database_Redis ( Settings & conf)

References ctx, dstream, Settings::exists(), Settings::get(), Settings::getU16(), and hash.

Here is the call graph for this function:

◆ ~Database_Redis()

Database_Redis::~Database_Redis ( )

References ctx.

Member Function Documentation

◆ beginSave()

void Database_Redis::beginSave ( )
virtual

Implements Database.

References ctx.

◆ deleteBlock()

bool Database_Redis::deleteBlock ( const v3s16 & pos)
virtual

Implements MapDatabase.

References ctx, MapDatabase::getBlockAsInteger(), hash, i64tos(), and warningstream.

Here is the call graph for this function:

◆ endSave()

void Database_Redis::endSave ( )
virtual

Implements Database.

References ctx.

◆ listAllLoadableBlocks()

void Database_Redis::listAllLoadableBlocks ( std::vector< v3s16 > & dst)
virtual

Implements MapDatabase.

References ctx, MapDatabase::getIntegerAsBlock(), hash, and stoi64().

Here is the call graph for this function:

◆ loadBlock()

void Database_Redis::loadBlock ( const v3s16 & pos,
std::string * block )
virtual

Implements MapDatabase.

References ctx, errorstream, MapDatabase::getBlockAsInteger(), hash, and i64tos().

Here is the call graph for this function:

◆ saveBlock()

bool Database_Redis::saveBlock ( const v3s16 & pos,
std::string_view data )
virtual

Implements MapDatabase.

References ctx, MapDatabase::getBlockAsInteger(), hash, i64tos(), and warningstream.

Here is the call graph for this function:

Member Data Documentation

◆ ctx

redisContext* Database_Redis::ctx = nullptr
private

◆ hash

std::string Database_Redis::hash = ""
private

The documentation for this class was generated from the following files: