olp-cpp-sdk  1.22.0
Public Member Functions | List of all members
olp::dataservice::write::VolatileLayerClient Class Reference

Publishes data to a volatile layer. More...

#include <VolatileLayerClient.h>

Public Member Functions

 VolatileLayerClient (client::HRN catalog, client::OlpClientSettings settings)
 Creates the VolatileLayerClient instance. More...
 
void CancelPendingRequests ()
 Cancels all the ongoing operations that this client started. More...
 
olp::client::CancellableFuture< PublishPartitionDataResponsePublishPartitionData (model::PublishPartitionDataRequest request)
 Publishes data to the volatile layer. More...
 
olp::client::CancellationToken PublishPartitionData (model::PublishPartitionDataRequest request, PublishPartitionDataCallback callback)
 Publishes data to the volatile layer. More...
 
olp::client::CancellableFuture< GetBaseVersionResponseGetBaseVersion ()
 Gets the latest version number of the catalog. More...
 
olp::client::CancellationToken GetBaseVersion (GetBaseVersionCallback callback)
 Gets the latest version number of the catalog. More...
 
olp::client::CancellableFuture< StartBatchResponseStartBatch (model::StartBatchRequest request)
 Starts the batch operation. More...
 
olp::client::CancellationToken StartBatch (model::StartBatchRequest request, StartBatchCallback callback)
 Starts the batch operation. More...
 
olp::client::CancellableFuture< GetBatchResponseGetBatch (const model::Publication &pub)
 Gets the details of the batch publication. More...
 
olp::client::CancellationToken GetBatch (const model::Publication &pub, GetBatchCallback callback)
 Gets the details of the batch publication. More...
 
olp::client::CancellableFuture< PublishToBatchResponsePublishToBatch (const model::Publication &pub, const std::vector< model::PublishPartitionDataRequest > &partitions)
 Publishes metadata to the HERE platform. More...
 
olp::client::CancellationToken PublishToBatch (const model::Publication &pub, const std::vector< model::PublishPartitionDataRequest > &partitions, PublishToBatchCallback callback)
 Publishes metadata to the HERE platform. More...
 
olp::client::CancellableFuture< CompleteBatchResponseCompleteBatch (const model::Publication &pub)
 Completes the batch operation and commits it to the HERE platform. More...
 
olp::client::CancellationToken CompleteBatch (const model::Publication &pub, CompleteBatchCallback callback)
 Completes the batch operation and commits it to the HERE platform. More...
 

Detailed Description

Publishes data to a volatile layer.

Constructor & Destructor Documentation

◆ VolatileLayerClient()

olp::dataservice::write::VolatileLayerClient::VolatileLayerClient ( client::HRN  catalog,
client::OlpClientSettings  settings 
)

Creates the VolatileLayerClient instance.

Parameters
catalogThe HRN of the catalog to which this client writes.
settingsThe client settings used to control the behavior of the client instance.

Member Function Documentation

◆ CancelPendingRequests()

void olp::dataservice::write::VolatileLayerClient::CancelPendingRequests ( )

Cancels all the ongoing operations that this client started.

Returns instantly and does not wait for callbacks. Use this operation to cancel all the pending requests without destroying the actual client instance.

◆ CompleteBatch() [1/2]

olp::client::CancellableFuture<CompleteBatchResponse> olp::dataservice::write::VolatileLayerClient::CompleteBatch ( const model::Publication pub)

Completes the batch operation and commits it to the HERE platform.

Parameters
pubThe Publication instance.
Returns
CancellableFuture that contains CompleteBatchResponse.

◆ CompleteBatch() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::CompleteBatch ( const model::Publication pub,
CompleteBatchCallback  callback 
)

Completes the batch operation and commits it to the HERE platform.

Parameters
pubThe Publication instance.
callbackCompleteBatchCallback that is called with CompleteBatchResponse when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ GetBaseVersion() [1/2]

olp::client::CancellableFuture<GetBaseVersionResponse> olp::dataservice::write::VolatileLayerClient::GetBaseVersion ( )

Gets the latest version number of the catalog.

Returns
CancellableFuture that contains the latest version number of the catalog.

◆ GetBaseVersion() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::GetBaseVersion ( GetBaseVersionCallback  callback)

Gets the latest version number of the catalog.

Parameters
callbackGetBaseVersionCallback that is called with GetBaseVersionResponse when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ GetBatch() [1/2]

olp::client::CancellableFuture<GetBatchResponse> olp::dataservice::write::VolatileLayerClient::GetBatch ( const model::Publication pub)

Gets the details of the batch publication.

Parameters
pubThe Publication instance.
Returns
CancellableFuture that contains the details of the batch publication.

◆ GetBatch() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::GetBatch ( const model::Publication pub,
GetBatchCallback  callback 
)

Gets the details of the batch publication.

Parameters
pubThe Publication instance.
callbackGetBatchCallback that is called with GetBatchResponse when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ PublishPartitionData() [1/2]

olp::client::CancellableFuture<PublishPartitionDataResponse> olp::dataservice::write::VolatileLayerClient::PublishPartitionData ( model::PublishPartitionDataRequest  request)

Publishes data to the volatile layer.

Note
The content-type for this request is set implicitly based on the layer metadata of the target layer.
Parameters
requestThe PublishPartitionDataRequest object.
Returns
CancellableFuture that contains PublishPartitionDataResponse.

◆ PublishPartitionData() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::PublishPartitionData ( model::PublishPartitionDataRequest  request,
PublishPartitionDataCallback  callback 
)

Publishes data to the volatile layer.

Note
The content-type for this request is set implicitly based on the layer metadata of the target layer.
Parameters
requestThe PublishPartitionDataRequest object.
callbackPublishPartitionDataCallback that is called with PublishPartitionDataResponse when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ PublishToBatch() [1/2]

olp::client::CancellableFuture<PublishToBatchResponse> olp::dataservice::write::VolatileLayerClient::PublishToBatch ( const model::Publication pub,
const std::vector< model::PublishPartitionDataRequest > &  partitions 
)

Publishes metadata to the HERE platform.

This task consists of two steps:

  1. Publish the metadata.
  2. Publish the data blob.

This API handles the first step, which has to be done before publishing the data blob. Otherwise, clients will receive an empty vector from the publishing result. Changing the metadata of the partition results in updating the catalog version.

Parameters
pubThe Publication instance.
partitionsA group of PublishPartitionDataRequest objects that have the following fields: layer ID, partition, HERE checksum, and data. Do not define the data as this call is only for updating metadata.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ PublishToBatch() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::PublishToBatch ( const model::Publication pub,
const std::vector< model::PublishPartitionDataRequest > &  partitions,
PublishToBatchCallback  callback 
)

Publishes metadata to the HERE platform.

This task consists of two steps:

  1. Publish the metadata.
  2. Publish the data blob.

This API handles the first step, which has to be done before publishing the data blob. Otherwise, clients will receive an empty vector from the publishing result. Changing the metadata of the partition results in updating the catalog version.

Parameters
pubThe Publication instance.
partitionsA group of PublishPartitionDataRequest objects that have the following fields: layer ID, partition, HERE checksum, and data. Do not define the data as this call is only for updating metadata.
callbackPublishToBatchCallback that is called with PublishToBatchResponse` when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

◆ StartBatch() [1/2]

olp::client::CancellableFuture<StartBatchResponse> olp::dataservice::write::VolatileLayerClient::StartBatch ( model::StartBatchRequest  request)

Starts the batch operation.

Parameters
requestThe StartBatchRequest object.
Returns
CancellableFuture that contains StartBatchResponse.

◆ StartBatch() [2/2]

olp::client::CancellationToken olp::dataservice::write::VolatileLayerClient::StartBatch ( model::StartBatchRequest  request,
StartBatchCallback  callback 
)

Starts the batch operation.

Parameters
requestThe StartBatchRequest object.
callbackStartBatchCallback that is called with StartBatchResponse when the operation completes.
Returns
CancellationToken that can be used to cancel the ongoing request.

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