Helper class to generate cache keys for different entities.
More...
#include <KeyGenerator.h>
|
static std::string | CreateApiKey (const std::string &hrn, const std::string &service, const std::string &version) |
| Generates cache key for service API. More...
|
|
static std::string | CreateCatalogKey (const std::string &hrn) |
| Generates cache key for catalog data. More...
|
|
static std::string | CreateLatestVersionKey (const std::string &hrn) |
| Generates cache key to store latest catalog version. More...
|
|
static std::string | CreatePartitionKey (const std::string &hrn, const std::string &layer_id, const std::string &partition_id, const boost::optional< int64_t > &version) |
| Generates cache key for storing partition data. More...
|
|
static std::string | CreatePartitionsKey (const std::string &hrn, const std::string &layer_id, const boost::optional< int64_t > &version) |
| Generates cache key for storing list of partitions. More...
|
|
static std::string | CreateLayerVersionsKey (const std::string &hrn, const int64_t version) |
| Generates cache key for storing list of available layer versions. More...
|
|
static std::string | CreateQuadTreeKey (const std::string &hrn, const std::string &layer_id, olp::geo::TileKey root, const boost::optional< int64_t > &version, int32_t depth) |
| Generates cache key for storing quadtree metadata. More...
|
|
static std::string | CreateDataHandleKey (const std::string &hrn, const std::string &layer_id, const std::string &data_handle) |
| Generates cache key for data handle entities. More...
|
|
Helper class to generate cache keys for different entities.
◆ CreateApiKey()
static std::string olp::cache::KeyGenerator::CreateApiKey |
( |
const std::string & |
hrn, |
|
|
const std::string & |
service, |
|
|
const std::string & |
version |
|
) |
| |
|
static |
Generates cache key for service API.
- Parameters
-
hrn | The HRN of the catalog. |
service | The service. |
version | The version of the service. |
- Returns
- A key used to store the API in cache.
◆ CreateCatalogKey()
static std::string olp::cache::KeyGenerator::CreateCatalogKey |
( |
const std::string & |
hrn | ) |
|
|
static |
Generates cache key for catalog data.
- Parameters
-
hrn | The HRN of the catalog. |
- Returns
- A key used to store the catalog data in cache.
◆ CreateDataHandleKey()
static std::string olp::cache::KeyGenerator::CreateDataHandleKey |
( |
const std::string & |
hrn, |
|
|
const std::string & |
layer_id, |
|
|
const std::string & |
data_handle |
|
) |
| |
|
static |
Generates cache key for data handle entities.
- Parameters
-
hrn | The HRN of the catalog. |
layer_id | The layer of the data handle. |
data_handle | The data handle. |
- Returns
- A key used to store the data handle in cache.
◆ CreateLatestVersionKey()
static std::string olp::cache::KeyGenerator::CreateLatestVersionKey |
( |
const std::string & |
hrn | ) |
|
|
static |
Generates cache key to store latest catalog version.
- Parameters
-
hrn | The HRN of the catalog. |
- Returns
- A key used to store the version in cache.
◆ CreateLayerVersionsKey()
static std::string olp::cache::KeyGenerator::CreateLayerVersionsKey |
( |
const std::string & |
hrn, |
|
|
const int64_t |
version |
|
) |
| |
|
static |
Generates cache key for storing list of available layer versions.
- Parameters
-
hrn | The HRN of the catalog. |
version | The version of the catalog. |
- Returns
- A key used to store the list layer versions in cache.
◆ CreatePartitionKey()
static std::string olp::cache::KeyGenerator::CreatePartitionKey |
( |
const std::string & |
hrn, |
|
|
const std::string & |
layer_id, |
|
|
const std::string & |
partition_id, |
|
|
const boost::optional< int64_t > & |
version |
|
) |
| |
|
static |
Generates cache key for storing partition data.
- Parameters
-
hrn | The HRN of the catalog. |
layer_id | The layer of the partition. |
partition_id | The partition name. |
version | The version of the catalog. |
- Returns
- A key used to store the patition data in cache.
◆ CreatePartitionsKey()
static std::string olp::cache::KeyGenerator::CreatePartitionsKey |
( |
const std::string & |
hrn, |
|
|
const std::string & |
layer_id, |
|
|
const boost::optional< int64_t > & |
version |
|
) |
| |
|
static |
Generates cache key for storing list of partitions.
- Parameters
-
hrn | The HRN of the catalog. |
layer_id | The layer of the partition. |
version | The version of the catalog. |
- Returns
- A key used to store the list of patitions in cache.
◆ CreateQuadTreeKey()
static std::string olp::cache::KeyGenerator::CreateQuadTreeKey |
( |
const std::string & |
hrn, |
|
|
const std::string & |
layer_id, |
|
|
olp::geo::TileKey |
root, |
|
|
const boost::optional< int64_t > & |
version, |
|
|
int32_t |
depth |
|
) |
| |
|
static |
Generates cache key for storing quadtree metadata.
- Parameters
-
hrn | The HRN of the catalog. |
layer_id | The layer of the quadtree. |
root | The root tile of the quadtree. |
version | The version of the catalog. |
depth | The quadtree depth. |
- Returns
- A key used to store the quadtree in cache.
The documentation for this class was generated from the following file: