olp-cpp-sdk  1.22.0
Public Member Functions | List of all members
olp::dataservice::read::VersionedLayerClient Class Referencefinal

Gets data from a versioned layer of the HERE platform. More...

#include <VersionedLayerClient.h>

Public Member Functions

 VersionedLayerClient (client::HRN catalog, std::string layer_id, boost::optional< int64_t > catalog_version, client::OlpClientSettings settings)
 Creates the VersionedLayerClient instance with the specified catalog version. More...
 
 VersionedLayerClient (const VersionedLayerClient &other)=delete
 A copy constructor.
 
 VersionedLayerClient (VersionedLayerClient &&other) noexcept
 A default move constructor.
 
VersionedLayerClientoperator= (const VersionedLayerClient &other)=delete
 A copy assignment operator.
 
VersionedLayerClientoperator= (VersionedLayerClient &&other) noexcept
 A move assignment operator.
 
bool CancelPendingRequests ()
 Cancels all active and pending requests. More...
 
client::CancellationToken GetData (DataRequest data_request, DataResponseCallback callback)
 Fetches data asynchronously using a partition ID or data handle. More...
 
client::CancellableFuture< DataResponseGetData (DataRequest data_request)
 Fetches data asynchronously using a partition ID or data handle. More...
 
client::CancellationToken GetData (TileRequest request, DataResponseCallback callback)
 Fetches data asynchronously using a TileKey. More...
 
client::CancellableFuture< DataResponseGetData (TileRequest request)
 Fetches data asynchronously using a TileKey. More...
 
client::CancellationToken GetAggregatedData (TileRequest request, AggregatedDataResponseCallback callback)
 Fetches data of a tile or its closest ancestor. More...
 
client::CancellableFuture< AggregatedDataResponseGetAggregatedData (TileRequest request)
 Fetches data of a tile or its closest ancestor. More...
 
client::CancellationToken GetPartitions (PartitionsRequest partitions_request, PartitionsResponseCallback callback)
 Fetches a list of partitions of the given generic layer asynchronously. More...
 
client::CancellationToken StreamLayerPartitions (PartitionsRequest partitions_request, PartitionsStreamCallback partition_stream_callback, CallbackNoResult callback)
 Fetches a list of partitions of the given generic layer asynchronously. Client does not cache the partitions, instead every partition is passed to the provided callback. More...
 
client::CancellableFuture< PartitionsResponseGetPartitions (PartitionsRequest partitions_request)
 Fetches a list of partitions of the given generic layer asynchronously. More...
 
client::CancellationToken QuadTreeIndex (TileRequest tile_request, PartitionsResponseCallback callback)
 Fetches a list of partitions including data size, checksum and crc asynchronously. More...
 
client::CancellationToken PrefetchTiles (PrefetchTilesRequest request, PrefetchTilesResponseCallback callback, PrefetchStatusCallback status_callback=nullptr)
 Prefetches a set of tiles asynchronously. More...
 
client::CancellableFuture< PrefetchTilesResponsePrefetchTiles (PrefetchTilesRequest request, PrefetchStatusCallback status_callback=nullptr)
 Prefetches a set of tiles asynchronously. More...
 
client::CancellationToken PrefetchPartitions (PrefetchPartitionsRequest request, PrefetchPartitionsResponseCallback callback, PrefetchPartitionsStatusCallback status_callback=nullptr)
 Prefetches a set of partitions asynchronously. More...
 
client::CancellableFuture< PrefetchPartitionsResponsePrefetchPartitions (PrefetchPartitionsRequest request, PrefetchPartitionsStatusCallback status_callback=nullptr)
 Prefetches a set of partitions asynchronously. More...
 
bool RemoveFromCache (const std::string &partition_id)
 Removes the partition from the mutable disk cache. More...
 
bool RemoveFromCache (const geo::TileKey &tile)
 Removes the tile from the mutable disk cache. More...
 
client::ApiNoResponse DeleteFromCache (const std::string &partition_id)
 Removes the partition from the mutable disk cache. More...
 
client::ApiNoResponse DeleteFromCache (const geo::TileKey &tile)
 Removes the tile from the mutable disk cache. More...
 
bool IsCached (const std::string &partition_id) const
 Checks whether the partition is cached. More...
 
bool IsCached (const geo::TileKey &tile, bool aggregated=false) const
 Checks whether the tile is cached. More...
 
bool Protect (const TileKeys &tiles)
 Protects tile keys from eviction. More...
 
bool Protect (const std::string &partition_id)
 Protect partition from eviction. More...
 
bool Protect (const std::vector< std::string > &partition_ids)
 Protect partitions from eviction. More...
 
bool Release (const TileKeys &tiles)
 Removes a list of tiles from protection. More...
 
bool Release (const std::string &partition_id)
 Removes partition from protection. More...
 
bool Release (const std::vector< std::string > &partition_ids)
 Removes partitions from protection. More...
 

Detailed Description

Gets data from a versioned layer of the HERE platform.

The versioned layer stores slowly-changing data that must remain logically consistent with other layers in a catalog. You can request any data version from the versioned layer. When you request a particular version of data from the versioned layer, the partition you receive in the response may have a lower version number than you requested. The version of a layer or partition represents the catalog version in which the layer or partition was last updated.

Note
If the catalog version is not specified, the version is set upon the first request made, based on this rules which apply for each specific FetchOptions:
  • OnlineOnly - version is resolved from online.
  • CacheOnly - version is resolved from cache.
  • OnlineIfNotFound - retrieve from online first, then checks the cache in case of error. Update cache version if online version is higher then the cache version.

An example with the catalog version provided that saves one network request:

auto task_scheduler =
auto http_client = olp::client::
olp::authentication::Settings settings{"Your.Key.Id", "Your.Key.Secret"};
settings.task_scheduler = task_scheduler;
settings.network_request_handler = http_client;
auth_settings.provider =
auto client_settings = olp::client::OlpClientSettings();
client_settings.authentication_settings = auth_settings;
client_settings.task_scheduler = std::move(task_scheduler);
client_settings.network_request_handler = std::move(http_client);
VersionedLayerClient client{"hrn:here:data:::your-catalog-hrn", "your-layer-id", "catalog-version", client_settings};
auto request = DataRequest().WithPartitionId("269");
auto token = client.GetData(request, callback);
Represents a request outcome.
Definition: ApiResponse.h:65
static std::shared_ptr< http::Network > CreateDefaultNetworkRequestHandler(size_t max_requests_count=30u)
Creates the Network instance used for all the non-local requests.
static std::unique_ptr< thread::TaskScheduler > CreateDefaultTaskScheduler(size_t thread_count=1u)
Creates the TaskScheduler instance used for all the delayed operations.
VersionedLayerClient(client::HRN catalog, std::string layer_id, boost::optional< int64_t > catalog_version, client::OlpClientSettings settings)
Creates the VersionedLayerClient instance with the specified catalog version.
TokenProvider< kDefaultMinimumValidity > TokenProviderDefault
Definition: TokenProvider.h:163
Configures the TokenEndpoint instance.
Definition: Settings.h:50
std::shared_ptr< thread::TaskScheduler > task_scheduler
(Optional) The TaskScheduler class that is used to manage the callbacks enqueue.
Definition: Settings.h:75
A set of settings that manages the TokenProviderCallback and TokenProviderCancelCallback functions.
Definition: OlpClientSettings.h:75
Configures the behavior of the OlpClient class.
Definition: OlpClientSettings.h:180
See also
The versioned layer section in the Data User Guide.

Constructor & Destructor Documentation

◆ VersionedLayerClient()

olp::dataservice::read::VersionedLayerClient::VersionedLayerClient ( client::HRN  catalog,
std::string  layer_id,
boost::optional< int64_t >  catalog_version,
client::OlpClientSettings  settings 
)

Creates the VersionedLayerClient instance with the specified catalog version.

The instance of this client is locked to the specified catalog version passed to the constructor and can't be changed. This way we assure data consistency. Keep in mind that catalog version provided with requests like DataRequest, PartitionsRequest, and PrefetchTilesRequest will be ignored.

Note
If you didn't specify the catalog version, the last available version is requested once and used for the entire lifetime of this instance.
Parameters
catalogThe HERE Resource Name (HRN) of the catalog that contains the versioned layer from which you want to get data.
layer_idThe layer ID of the versioned layer from which you want to get data.
catalog_versionThe version of the catalog from which you want to get data. If no version is specified, the last available version is used instead.
settingsThe OlpClientSettings instance.
Returns
The VersionedLayerClient instance with the specified catalog version.

Member Function Documentation

◆ CancelPendingRequests()

bool olp::dataservice::read::VersionedLayerClient::CancelPendingRequests ( )

Cancels all active and pending requests.

Returns
True if the request is successful; false otherwise.

◆ DeleteFromCache() [1/2]

client::ApiNoResponse olp::dataservice::read::VersionedLayerClient::DeleteFromCache ( const geo::TileKey tile)

Removes the tile from the mutable disk cache.

Parameters
tileThe tile key that should be removed.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
An error if the tile data could not be removed from the cache.

◆ DeleteFromCache() [2/2]

client::ApiNoResponse olp::dataservice::read::VersionedLayerClient::DeleteFromCache ( const std::string &  partition_id)

Removes the partition from the mutable disk cache.

Parameters
partition_idThe partition ID that should be removed.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
An error if the partition data could not be removed from the cache.

◆ GetAggregatedData() [1/2]

client::CancellableFuture<AggregatedDataResponse> olp::dataservice::read::VersionedLayerClient::GetAggregatedData ( TileRequest  request)

Fetches data of a tile or its closest ancestor.

Parameters
requestThe TileRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Returns
CancellableFuture that contains the AggregatedDataResponse instance or an error. You can also use CancellableFuture to cancel this request.

◆ GetAggregatedData() [2/2]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::GetAggregatedData ( TileRequest  request,
AggregatedDataResponseCallback  callback 
)

Fetches data of a tile or its closest ancestor.

Parameters
requestThe TileRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Parameters
callbackThe AggregatedDataResponseCallback object that is invoked if the AggregatedDataResult object is available or an error is encountered.
Returns
A token that can be used to cancel this request.

◆ GetData() [1/4]

client::CancellableFuture<DataResponse> olp::dataservice::read::VersionedLayerClient::GetData ( DataRequest  data_request)

Fetches data asynchronously using a partition ID or data handle.

If the specified partition or data handle cannot be found in the layer, the callback is invoked with the empty DataResponse object (the nullptr result and an error). If a partition ID or data handle is not set in the request, the callback is invoked with the following error: ErrorCode::InvalidRequest.

Parameters
data_requestThe DataRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Returns
CancellableFuture that contains the DataResponse instance or an error. You can also use CancellableFuture to cancel this request.

◆ GetData() [2/4]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::GetData ( DataRequest  data_request,
DataResponseCallback  callback 
)

Fetches data asynchronously using a partition ID or data handle.

If the specified partition ID or data handle cannot be found in the layer, the callback is invoked with the empty DataResponse object (the nullptr result and an error). If a partition ID or data handle is not set in the request, the callback is invoked with the following error: ErrorCode::InvalidRequest. If the version is not specified, an additional request to the HERE platform is created to retrieve the latest available partition version.

Parameters
data_requestThe DataRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Parameters
callbackThe DataResponseCallback object that is invoked if the DataResult object is available or an error is encountered.
Returns
A token that can be used to cancel this request.

◆ GetData() [3/4]

client::CancellableFuture<DataResponse> olp::dataservice::read::VersionedLayerClient::GetData ( TileRequest  request)

Fetches data asynchronously using a TileKey.

If the specified TileKey cannot be found in the layer, the callback is invoked with the empty DataResponse object (the nullptr result and an error). Version for request used from VersionedLayerClient constructor parameter. If no version is specified, the last available version is used instead.GetData(TileRequest) method optimizes the metadata query by requesting a QuadTree with depth 4 and store all subquads in cache. This way all further GetData(TileRequest) request that are contained within this QuadTree will profit from the already cached metadata.

Note
Calling this method only makes sense if you have a persistent cache connected.
Parameters
requestThe TileRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Returns
CancellableFuture that contains the DataResponse instance or an error. You can also use CancellableFuture to cancel this request.

◆ GetData() [4/4]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::GetData ( TileRequest  request,
DataResponseCallback  callback 
)

Fetches data asynchronously using a TileKey.

If the specified TileKey cannot be found in the layer, the callback is invoked with the empty DataResponse object (the nullptr result and an error). Version for request used from VersionedLayerClient constructor parameter. If no version is specified, the last available version is used instead. GetData(TileRequest) method optimizes the metadata query by requesting a QuadTree with depth 4 and store all subquads in cache. This way all further GetData(TileRequest) request that are contained within this QuadTree will profit from the already cached metadata.

Note
Calling this method only makes sense if you have a persistent cache connected.
Parameters
requestThe TileRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Parameters
callbackThe DataResponseCallback object that is invoked if the DataResult object is available or an error is encountered.
Returns
A token that can be used to cancel this request.

◆ GetPartitions() [1/2]

client::CancellableFuture<PartitionsResponse> olp::dataservice::read::VersionedLayerClient::GetPartitions ( PartitionsRequest  partitions_request)

Fetches a list of partitions of the given generic layer asynchronously.

Note
If your layer has lots of partitions or uses tile keys as partition IDs, then this operation can fail because of the large amount of data.
Parameters
partitions_requestThe PartitionsRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Returns
CancellableFuture that contains the PartitionsResponse instance with data or an error. You can also use CancellableFuture to cancel this request.

◆ GetPartitions() [2/2]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::GetPartitions ( PartitionsRequest  partitions_request,
PartitionsResponseCallback  callback 
)

Fetches a list of partitions of the given generic layer asynchronously.

Note
If your layer has lots of partitions or uses tile keys as partition IDs, then this operation can fail because of the large amount of data.
Parameters
partitions_requestThe PartitionsRequest instance that contains a complete set of request parameters.
Note
CacheWithUpdate fetch option is not supported.
Parameters
callbackThe PartitionsResponseCallback object that is invoked if the list of partitions is available or an error is encountered.
Returns
A token that can be used to cancel this request.

◆ IsCached() [1/2]

bool olp::dataservice::read::VersionedLayerClient::IsCached ( const geo::TileKey tile,
bool  aggregated = false 
) const

Checks whether the tile is cached.

Parameters
tileThe tile key.
aggregatedThe aggregated flag, used to specify whether the tile is aggregated or not.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
True if the tile data is cached; false otherwise.

◆ IsCached() [2/2]

bool olp::dataservice::read::VersionedLayerClient::IsCached ( const std::string &  partition_id) const

Checks whether the partition is cached.

Parameters
partition_idThe partition ID.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
True if the partition data is cached; false otherwise.

◆ PrefetchPartitions() [1/2]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::PrefetchPartitions ( PrefetchPartitionsRequest  request,
PrefetchPartitionsResponseCallback  callback,
PrefetchPartitionsStatusCallback  status_callback = nullptr 
)

Prefetches a set of partitions asynchronously.

This method downloads all partitions listed in PrefetchPartitionsRequest. Only partitions that are not already present in the cache are downloaded. It helps reduce the network load.

Note
This method does not guarantee that all partitions are available offline as the cache might overflow, and data might be evicted at any point. Use GetData(DataRequest) to retrieve partitions loaded by PrefetchPartitions.
Parameters
requestThe PrefetchPartitionsRequest instance that contains a complete set of request parameters.
callbackThe PrefetchPartitionsResponseCallback object that is invoked if the PrefetchPartitionsResult instance is available or an error occurs.
status_callbackThe PrefetchPartitionsStatusCallback object that is invoked every time a partition is fetched.
Returns
A token that can be used to cancel this request.

◆ PrefetchPartitions() [2/2]

client::CancellableFuture<PrefetchPartitionsResponse> olp::dataservice::read::VersionedLayerClient::PrefetchPartitions ( PrefetchPartitionsRequest  request,
PrefetchPartitionsStatusCallback  status_callback = nullptr 
)

Prefetches a set of partitions asynchronously.

This method downloads all partitions listed in PrefetchPartitionsRequest. Only partitions that are not already present in the cache are downloaded. It helps reduce the network load.

Note
This method does not guarantee that all partitions are available offline as the cache might overflow, and data might be evicted at any point. Use GetData(DataRequest) to retrieve partitions loaded by PrefetchPartitions.
Parameters
requestThe PrefetchPartitionsRequest instance that contains a complete set of request parameters.
status_callbackThe PrefetchPartitionsStatusCallback object that is invoked every time a partition is fetched.
Returns
CancellableFuture that contains the PrefetchPartitionsResponse instance with data or an error. You can also use CancellableFuture to cancel this request.

◆ PrefetchTiles() [1/2]

client::CancellableFuture<PrefetchTilesResponse> olp::dataservice::read::VersionedLayerClient::PrefetchTiles ( PrefetchTilesRequest  request,
PrefetchStatusCallback  status_callback = nullptr 
)

Prefetches a set of tiles asynchronously.

This method recursively downloads all tile keys from the min_level parameter to the max_level parameter of the PrefetchTilesRequest object for the given root tiles. If min_level/max_level are default, only tiles listed in PrefetchTilesRequest will be downloaded. Only tiles will be downloaded which are not already present in the cache, this helps reduce the network load.

Note
This method does not guarantee that all tiles are available offline as the cache might overflow, and data might be evicted at any point. Use GetData(TileRequest) or GetAggregatedData(TileRequest) to retrieve tiles loaded by PrefetchTiles.
Parameters
requestThe PrefetchTilesRequest instance that contains a complete set of request parameters.
status_callbackThe PrefetchStatusCallback object that is invoked every time a tile is fetched.
Returns
CancellableFuture that contains the PrefetchTilesResponse instance with data or an error. You can also use CancellableFuture to cancel this request.

◆ PrefetchTiles() [2/2]

client::CancellationToken olp::dataservice::read::VersionedLayerClient::PrefetchTiles ( PrefetchTilesRequest  request,
PrefetchTilesResponseCallback  callback,
PrefetchStatusCallback  status_callback = nullptr 
)

Prefetches a set of tiles asynchronously.

This method recursively downloads all tile keys from the min_level parameter to the max_level parameter of the PrefetchTilesRequest object for the given root tiles. If min_level/max_level are default, only tiles listed in PrefetchTilesRequest will be downloaded. Only tiles will be downloaded which are not already present in the cache, this helps reduce the network load.

Note
This method does not guarantee that all tiles are available offline as the cache might overflow, and data might be evicted at any point. Use GetData(TileRequest) or GetAggregatedData(TileRequest) to retrieve tiles loaded by PrefetchTiles.
Parameters
requestThe PrefetchTilesRequest instance that contains a complete set of request parameters.
callbackThe PrefetchTilesResponseCallback object that is invoked if the PrefetchTilesResult instance is available or an error is encountered.
status_callbackThe PrefetchStatusCallback object that is invoked every time a tile is fetched.
Returns
A token that can be used to cancel this request.

◆ Protect() [1/3]

bool olp::dataservice::read::VersionedLayerClient::Protect ( const std::string &  partition_id)

Protect partition from eviction.

Protecting partition means that its data and metadata keys are added to the protected list and stored in the cache. These keys are removed from the LRU cache, so they could not be evicted. Also, they do not expire.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
You can only protect partitions which data handles are present in the cache at the time of the call.
Please do not call Protect while the Release call for the same catalog and layer is in progress.
Parameters
partition_idPartition id to be protected.
Returns
True if partition keys were successfully added to the protected list; false otherwise.

◆ Protect() [2/3]

bool olp::dataservice::read::VersionedLayerClient::Protect ( const std::vector< std::string > &  partition_ids)

Protect partitions from eviction.

Protecting partitions means that its data and metadata keys are added to the protected list and stored in the cache. These keys are removed from the LRU cache, so they could not be evicted. Also, they do not expire.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
You can only protect partitions which data handles are present in the cache at the time of the call.
Please do not call Protect while the Release call for the same catalog and layer is in progress.
Parameters
partition_idsPartition ids to be protected.
Returns
True if partition keys were successfully added to the protected list; false otherwise.

◆ Protect() [3/3]

bool olp::dataservice::read::VersionedLayerClient::Protect ( const TileKeys &  tiles)

Protects tile keys from eviction.

Protecting tile keys means that its data and corresponding quadtree keys are added to the protected list and stored in the cache. These keys are removed from the LRU cache, so they could not be evicted. Also, they do not expire. The quadtree stays protected if at least one tile key is protected.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
You can only protect tiles which data handles are present in the cache at the time of the call.
Please do not call Protect while the Release call for the same catalog and layer is in progress.
Parameters
tilesThe list of tile keys to be protected.
Returns
True if some keys were successfully added to the protected list; false otherwise.

◆ QuadTreeIndex()

client::CancellationToken olp::dataservice::read::VersionedLayerClient::QuadTreeIndex ( TileRequest  tile_request,
PartitionsResponseCallback  callback 
)

Fetches a list of partitions including data size, checksum and crc asynchronously.

Note
CacheWithUpdate fetch option is not supported.
If OnlineIfNotFound fetch option is used and the cached data does not contain data size, checksum or crc, a new network request is triggered to download required data and update the cache record.
Parameters
tile_requestThe TileRequest instance that contains a complete set of request parameters.
callbackThe PartitionsResponseCallback object that is invoked if the list of partitions is available or an error is encountered.
Returns
A token that can be used to cancel this request.

◆ Release() [1/3]

bool olp::dataservice::read::VersionedLayerClient::Release ( const std::string &  partition_id)

Removes partition from protection.

Releasing partition id removes data handle and metadata keys from the protected list. The keys are added to the LRU cache, so they could be evicted. Expiration value is restored, and related to partition keys can expire.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Please make sure that Protect will not be called for the same catalog and layer while the Release call is in progress.
Parameters
partition_idPartition id to be removed from protection.
Returns
True if keys related to partition were successfully removed from the protected list; false otherwise.

◆ Release() [2/3]

bool olp::dataservice::read::VersionedLayerClient::Release ( const std::vector< std::string > &  partition_ids)

Removes partitions from protection.

Releasing partition ids removes data handle and metadata keys from the protected list. The keys are added to the LRU cache, so they could be evicted. Expiration value is restored, and related to partition keys can expire.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Please make sure that Protect will not be called for the same catalog and layer while the Release call is in progress.
Parameters
partition_idsPartition ids to be removed from protection.
Returns
True if keys related to partitions were successfully removed from the protected list; false otherwise.

◆ Release() [3/3]

bool olp::dataservice::read::VersionedLayerClient::Release ( const TileKeys &  tiles)

Removes a list of tiles from protection.

Releasing tile keys removes data and quadtree keys from the protected list. The keys are added to the LRU cache, so they could be evicted. Expiration value is restored, and keys can expire. The quadtree can be removed from the protected list if all tile keys are no longer protected.

Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Please make sure that Protect will not be called for the same catalog and layer while the Release call is in progress.
Parameters
tilesThe list of tile keys to be removed from protection.
Returns
True if some keys were successfully removed from the protected list; false otherwise.

◆ RemoveFromCache() [1/2]

bool olp::dataservice::read::VersionedLayerClient::RemoveFromCache ( const geo::TileKey tile)

Removes the tile from the mutable disk cache.

Parameters
tileThe tile key that should be removed.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
True if tile data is removed successfully; false otherwise.

◆ RemoveFromCache() [2/2]

bool olp::dataservice::read::VersionedLayerClient::RemoveFromCache ( const std::string &  partition_id)

Removes the partition from the mutable disk cache.

Parameters
partition_idThe partition ID that should be removed.
Note
Before calling the API, specify a catalog version. You can set it using the constructor or after the first online request.
Returns
True if partition data is removed successfully; false otherwise.

◆ StreamLayerPartitions()

client::CancellationToken olp::dataservice::read::VersionedLayerClient::StreamLayerPartitions ( PartitionsRequest  partitions_request,
PartitionsStreamCallback  partition_stream_callback,
CallbackNoResult  callback 
)

Fetches a list of partitions of the given generic layer asynchronously. Client does not cache the partitions, instead every partition is passed to the provided callback.

Note
API is considered experimental and a subject to change.
Parameters
partitions_requestThe PartitionsRequest instance that contains a complete set of request parameters.
Note
Fetch option and partition list are not supported.
Parameters
partition_stream_callbackThe PartitionsStreamCallback that receives every fetched partition.
callbackThe CallbackNoResult object that is invoked when operation is complete or an error is encountered.
Returns
A token that can be used to cancel this request.

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