C# Class Amazon.CognitoSync.SyncManager.Internal.CognitoSyncStorage

Remote data storage using Cognito Sync service on which we can invoke actions like creating a dataset or record.
Inheritance: IDisposable
Show file Open project: aws/aws-sdk-net Class Usage Examples

Public Methods

Method Description
BeginDeleteDataset ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DeleteDataset operation.

BeginGetDatasetMetadata ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the GetDatasetMetadata operation.

BeginListDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListDatasetMetadata operation.

BeginListUpdates ( string datasetName, long lastSyncCount, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the ListUpdates operation.

BeginPutRecords ( string datasetName, List records, string syncSessionToken, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the PutRecords operation.

DeleteDataset ( string datasetName ) : void

Deletes a dataset.

DeleteDatasetAsync ( string datasetName, CancellationToken cancellationToken ) : Task

Deletes a dataset.

EndDeleteDataset ( IAsyncResult asyncResult ) : void

Finishes the asynchronous execution of the DeleteDataset operation.

EndGetDatasetMetadata ( IAsyncResult asyncResult ) : DatasetMetadata

Finishes the asynchronous execution of the GetDatasetMetadata operation.

EndListDatasetMetadata ( IAsyncResult asyncResult ) : List

Finishes the asynchronous execution of the ListDatasetMetadata operation.

EndListUpdates ( IAsyncResult asyncResult ) : DatasetUpdates

Finishes the asynchronous execution of the ListUpdates operation.

EndPutRecords ( IAsyncResult asyncResult ) : List

Finishes the asynchronous execution of the PutRecords operation.

GetDatasetMetadata ( string datasetName ) : DatasetMetadata

Retrieves the metadata of a dataset.

GetDatasetMetadataAsync ( string datasetName, CancellationToken cancellationToken ) : Task

Retrieves the metadata of a dataset.

ListDatasetMetadata ( ) : List

Gets a list of DatasetMetadata

ListDatasetMetadataAsync ( CancellationToken cancellationToken ) : Task>

Gets a list of DatasetMetadata

ListUpdates ( string datasetName, long lastSyncCount ) : DatasetUpdates

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.

ListUpdatesAsync ( string datasetName, long lastSyncCount, CancellationToken cancellationToken ) : Task

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.

PutRecords ( string datasetName, List records, string syncSessionToken ) : List

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.

PutRecordsAsync ( string datasetName, List records, string syncSessionToken, CancellationToken cancellationToken ) : Task>

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.

Private Methods

Method Description
ExtractRecords ( Amazon.CognitoSync.Model.UpdateRecordsResponse response ) : List
PopulateListDatasetMetadata ( string nextToken, List datasets ) : List
PopulateListDatasetMetadata ( string nextToken, List datasets, CancellationToken cancellationToken ) : Task>
PopulateListUpdates ( string datasetName, long lastSyncCount, List records, string nextToken ) : DatasetUpdates
PopulateListUpdatesAsync ( string datasetName, long lastSyncCount, List records, string nextToken, CancellationToken cancellationToken ) : Task
PrepareDeleteDatasetRequest ( string datasetName ) : DeleteDatasetRequest
PrepareDescribeDatasetRequest ( string datasetName ) : DescribeDatasetRequest
PrepareListDatasetsRequest ( ) : ListDatasetsRequest
PrepareListRecordsRequest ( string datasetName, long lastSyncCount ) : ListRecordsRequest
PrepareUpdateRecordsRequest ( string datasetName, List records, string syncSessionToken ) : UpdateRecordsRequest

Method Details

BeginDeleteDataset() public method

Initiates the asynchronous execution of the DeleteDataset operation.
public BeginDeleteDataset ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return IAsyncResult

BeginGetDatasetMetadata() public method

Initiates the asynchronous execution of the GetDatasetMetadata operation.
public BeginGetDatasetMetadata ( string datasetName, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return IAsyncResult

BeginListDatasetMetadata() public method

Initiates the asynchronous execution of the ListDatasetMetadata operation.
public BeginListDatasetMetadata ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return IAsyncResult

BeginListUpdates() public method

Initiates the asynchronous execution of the ListUpdates operation.
public BeginListUpdates ( string datasetName, long lastSyncCount, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
lastSyncCount long Last sync count.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return IAsyncResult

BeginPutRecords() public method

Initiates the asynchronous execution of the PutRecords operation.
public BeginPutRecords ( string datasetName, List records, string syncSessionToken, AsyncCallback callback, object state ) : IAsyncResult
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.
return IAsyncResult

DeleteDataset() public method

Deletes a dataset.
public DeleteDataset ( string datasetName ) : void
datasetName string Dataset name.
return void

DeleteDatasetAsync() public method

Deletes a dataset.
public DeleteDatasetAsync ( string datasetName, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task

EndDeleteDataset() public method

Finishes the asynchronous execution of the DeleteDataset operation.
public EndDeleteDataset ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDeleteDataset.
return void

EndGetDatasetMetadata() public method

Finishes the asynchronous execution of the GetDatasetMetadata operation.
public EndGetDatasetMetadata ( IAsyncResult asyncResult ) : DatasetMetadata
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginGetDatasetMetadata.
return DatasetMetadata

EndListDatasetMetadata() public method

Finishes the asynchronous execution of the ListDatasetMetadata operation.
public EndListDatasetMetadata ( IAsyncResult asyncResult ) : List
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListDatasetMetadata.
return List

EndListUpdates() public method

Finishes the asynchronous execution of the ListUpdates operation.
public EndListUpdates ( IAsyncResult asyncResult ) : DatasetUpdates
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginListUpdates.
return DatasetUpdates

EndPutRecords() public method

Finishes the asynchronous execution of the PutRecords operation.
public EndPutRecords ( IAsyncResult asyncResult ) : List
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginPutRecords.
return List

GetDatasetMetadata() public method

Retrieves the metadata of a dataset.
public GetDatasetMetadata ( string datasetName ) : DatasetMetadata
datasetName string Dataset name.
return DatasetMetadata

GetDatasetMetadataAsync() public method

Retrieves the metadata of a dataset.
public GetDatasetMetadataAsync ( string datasetName, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task

ListDatasetMetadata() public method

Gets a list of DatasetMetadata
public ListDatasetMetadata ( ) : List
return List

ListDatasetMetadataAsync() public method

Gets a list of DatasetMetadata
public ListDatasetMetadataAsync ( CancellationToken cancellationToken ) : Task>
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task>

ListUpdates() public method

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.
public ListUpdates ( string datasetName, long lastSyncCount ) : DatasetUpdates
datasetName string Dataset name.
lastSyncCount long Last sync count.
return DatasetUpdates

ListUpdatesAsync() public method

Gets a list of records which have been updated since lastSyncCount (inclusive). If the value of a record equals null, then the record is deleted. If you pass 0 as lastSyncCount, the full list of records will be returned.
public ListUpdatesAsync ( string datasetName, long lastSyncCount, CancellationToken cancellationToken ) : Task
datasetName string Dataset name.
lastSyncCount long Last sync count.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task

PutRecords() public method

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.
public PutRecords ( string datasetName, List records, string syncSessionToken ) : List
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
return List

PutRecordsAsync() public method

Post updates to remote storage. Each record has a sync count. If the sync count doesn't match what's on the remote storage, i.e. the record is modified by a different device, this operation throws ConflictException. Otherwise it returns a list of records that are updated successfully.
public PutRecordsAsync ( string datasetName, List records, string syncSessionToken, CancellationToken cancellationToken ) : Task>
datasetName string Dataset name.
records List Records.
syncSessionToken string Sync session token.
cancellationToken CancellationToken /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
return Task>