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

A simple interface for key-value data blob stores. More...

#include <blobstorage.h>

Inherited by cpid::BlobStorageDisk, and cpid::BlobStorageRedis.

Public Member Functions

virtual ~BlobStorage ()=default
 
virtual void put (std::string const &key, std::vector< char > const &data)=0
 
virtual std::vector< char > get (std::string const &key)=0
 

Detailed Description

A simple interface for key-value data blob stores.

Keys are required to be unique, and calling put() twice with the same data will result in an exception. The reasoning is that we want to do local in-memory caching in ModelStorage and don't want to write cache invalidation logic (well, I don't want to, at least).

Constructor & Destructor Documentation

virtual cpid::BlobStorage::~BlobStorage ( )
virtualdefault

Member Function Documentation

virtual std::vector<char> cpid::BlobStorage::get ( std::string const &  key)
pure virtual
virtual void cpid::BlobStorage::put ( std::string const &  key,
std::vector< char > const &  data 
)
pure virtual

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