|
|
virtual | ~remote_cache_provider_t () |
| | De-initialzie the remote cache object.
|
| |
| virtual bool | connect (const std::string &host_description)=0 |
| | Connect to the remote cache. More...
|
| |
| virtual bool | is_connected () const =0 |
| | Check if we have a connection to the remote cache. More...
|
| |
| virtual cache_entry_t | lookup (const std::string &hash)=0 |
| | Check if an entry exists in the cache. More...
|
| |
| virtual void | add (const std::string &hash, const cache_entry_t &entry, const std::map< std::string, expected_file_t > &expected_files)=0 |
| | Adds a set of files to the cache. More...
|
| |
| virtual void | get_file (const std::string &hash, const std::string &source_id, const std::string &target_path, const bool is_compressed)=0 |
| | Copy a cached file to the local file system. More...
|
| |
◆ add()
| virtual void bcache::remote_cache_provider_t::add |
( |
const std::string & |
hash, |
|
|
const cache_entry_t & |
entry, |
|
|
const std::map< std::string, expected_file_t > & |
expected_files |
|
) |
| |
|
pure virtual |
Adds a set of files to the cache.
- Parameters
-
| hash | The cache entry identifier. |
| entry | The cache entry data (files, stdout, etc). |
| expected_files | Paths to the actual files in the local file system (map from file ID to an expected file descriptor). |
Implemented in bcache::redis_cache_provider_t, and bcache::http_cache_provider_t.
◆ connect()
| virtual bool bcache::remote_cache_provider_t::connect |
( |
const std::string & |
host_description | ) |
|
|
pure virtual |
◆ connection_timeout_ms()
| int bcache::remote_cache_provider_t::connection_timeout_ms |
( |
| ) |
|
|
staticprotected |
Get the timeout for remote connections.
- Returns
- the timeout, in milliseconds.
◆ get_file()
| virtual void bcache::remote_cache_provider_t::get_file |
( |
const std::string & |
hash, |
|
|
const std::string & |
source_id, |
|
|
const std::string & |
target_path, |
|
|
const bool |
is_compressed |
|
) |
| |
|
pure virtual |
Copy a cached file to the local file system.
- Parameters
-
| hash | The cache entry identifier. |
| source_id | The ID of the remote file to copy. |
| target_path | The path to the local file. |
| is_compressed | True if the remote data is compressed. |
Implemented in bcache::redis_cache_provider_t, and bcache::http_cache_provider_t.
◆ is_connected()
| virtual bool bcache::remote_cache_provider_t::is_connected |
( |
| ) |
const |
|
pure virtual |
◆ lookup()
| virtual cache_entry_t bcache::remote_cache_provider_t::lookup |
( |
const std::string & |
hash | ) |
|
|
pure virtual |
◆ parse_host_description()
| bool bcache::remote_cache_provider_t::parse_host_description |
( |
const std::string & |
host_description, |
|
|
std::string & |
host, |
|
|
int & |
port, |
|
|
std::string & |
path |
|
) |
| |
|
staticprotected |
Parse a host description string.
- Parameters
-
| host_description | The host description string. |
| [out] | host | The host name. |
| [out] | port | The port (optional - defaults to -1). |
| [out] | path | The path (optional - defaults to ""). |
- Returns
- true if the parser was successful, or false if it failed.
◆ transfer_timeout_ms()
| int bcache::remote_cache_provider_t::transfer_timeout_ms |
( |
| ) |
|
|
staticprotected |
Get the timeout for remote transfers.
- Returns
- the timeout, in milliseconds.
The documentation for this class was generated from the following files: