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
Afficher le fichier Open project: aws/aws-sdk-net Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat IAsyncResult

BeginGetDatasetMetadata() public méthode

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.
Résultat IAsyncResult

BeginListDatasetMetadata() public méthode

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.
Résultat IAsyncResult

BeginListUpdates() public méthode

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.
Résultat IAsyncResult

BeginPutRecords() public méthode

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.
Résultat IAsyncResult

DeleteDataset() public méthode

Deletes a dataset.
public DeleteDataset ( string datasetName ) : void
datasetName string Dataset name.
Résultat void

DeleteDatasetAsync() public méthode

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. ///
Résultat Task

EndDeleteDataset() public méthode

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

EndGetDatasetMetadata() public méthode

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

EndListDatasetMetadata() public méthode

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

EndListUpdates() public méthode

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

EndPutRecords() public méthode

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

GetDatasetMetadata() public méthode

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

GetDatasetMetadataAsync() public méthode

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. ///
Résultat Task

ListDatasetMetadata() public méthode

Gets a list of DatasetMetadata
public ListDatasetMetadata ( ) : List
Résultat List

ListDatasetMetadataAsync() public méthode

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. ///
Résultat Task>

ListUpdates() public méthode

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.
Résultat DatasetUpdates

ListUpdatesAsync() public méthode

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. ///
Résultat Task

PutRecords() public méthode

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.
Résultat List

PutRecordsAsync() public méthode

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. ///
Résultat Task>