TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | List of all members
cpid::BlobStorageRedis Class Reference

Blob storage in Redis. More...

#include <blobstorage.h>

Inherits cpid::BlobStorage.

Public Member Functions

 BlobStorageRedis (std::shared_ptr< Cpid2kWorker > worker, std::string prefix="blob")
 
virtual ~BlobStorageRedis () override
 
virtual void put (std::string const &key, std::vector< char > const &data) override
 
virtual std::vector< char > get (std::string const &key) override
 
- Public Member Functions inherited from cpid::BlobStorage
virtual ~BlobStorage ()=default
 

Detailed Description

Blob storage in Redis.

Note that Cpid2kWorker is only used to obtain a database connection in a thread-safe manner. Models are stored directly under the separately specified prefix to ease data access across jobs.

Constructor & Destructor Documentation

cpid::BlobStorageRedis::BlobStorageRedis ( std::shared_ptr< Cpid2kWorker worker,
std::string  prefix = "blob" 
)
cpid::BlobStorageRedis::~BlobStorageRedis ( )
overridevirtual

Member Function Documentation

std::vector< char > cpid::BlobStorageRedis::get ( std::string const &  key)
overridevirtual

Implements cpid::BlobStorage.

void cpid::BlobStorageRedis::put ( std::string const &  key,
std::vector< char > const &  data 
)
overridevirtual

Implements cpid::BlobStorage.


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