Interface IDataPersistenceProvider
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public interface IDataPersistenceProvider : IDisposable
Methods
ClearDataset(DatasetIdentifier)
Used to remove all data against the bucket.
Declaration
void ClearDataset(DatasetIdentifier dataSetIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier |
CreateStore()
Creates a new store.
Declaration
void CreateStore()
Destroy()
Removes all files related to persistence.
Declaration
void Destroy()
DisposeDataset(DatasetIdentifier)
Dispose the resources of dataset used by this node.
Declaration
void DisposeDataset(DatasetIdentifier dataSetIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier |
GetDatasetItemsCount(DatasetIdentifier)
Used to get the count of all the items of the given dataset in the persistence provider.
Declaration
long GetDatasetItemsCount(DatasetIdentifier dataSetIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier |
Returns
| Type | Description |
|---|---|
| System.Int64 | Count of items. |
GetDatasetReader(DatasetIdentifier)
Used to load whole bucket into the cache.
Declaration
IDataReader<string, string> GetDatasetReader(DatasetIdentifier dataSetIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier |
Returns
| Type | Description |
|---|---|
| IDataReader<System.String, System.String> | Dictionary of bulk items returned from persistence provider. |
Initialize(String, IDictionary)
Initializes the data persistence provider on startup.
Declaration
void Initialize(string storeName, IDictionary parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | storeName | Name of the persistence store. |
| System.Collections.IDictionary | parameters | Parameters required to connect to the persistence provider. |
LoadData(DatasetIdentifier, ICollection<String>)
Used for getBulk call while data is being loaded into the cache from the persistence store.
Declaration
IDictionary<string, string> LoadData(DatasetIdentifier dataSetIdentifier, ICollection<string> keys)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.Collections.Generic.ICollection<System.String> | keys | Keys of the items to be loaded. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<System.String, System.String> | Dictionary of bulk items returned from the persistence provider. |
LoadData(DatasetIdentifier, String)
Used for get call while data is being loaded into the cache from the persistence store.
Declaration
KeyValuePair<string, string> LoadData(DatasetIdentifier dataSetIdentifier, string key)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.String | key | Keys of the items to be loaded. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.KeyValuePair<System.String, System.String> | KeyValuePair of entry returned from the persistence provider. |
LoadDataset(DatasetIdentifier)
Used to load the whole bucket into the cache.
Declaration
IDictionary<string, string> LoadDataset(DatasetIdentifier dataSetIdentifier)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<System.String, System.String> | Dictionary of bulk items returned from the persistence provider. |
RemoveData(DatasetIdentifier, ICollection<String>)
Used to remove/delete bulk data from the persistence provider.
Declaration
void RemoveData(DatasetIdentifier dataSetIdentifier, ICollection<string> keys)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.Collections.Generic.ICollection<System.String> | keys | Keys of the items to be loaded. |
RemoveData(DatasetIdentifier, String)
Used to remove/delete a dataset from the persistence provider.
Declaration
void RemoveData(DatasetIdentifier dataSetIdentifier, string key)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.String | key | Keys of the items to be loaded. |
RemoveSafeDeletedRows()
Removes the safe deleted rows permanently.
Declaration
void RemoveSafeDeletedRows()
StoreData(DatasetIdentifier, IDictionary<String, StorageEntryInfo>)
Used for addBulk, updateBulk and storing whole bucket data to the persistence provider.
Declaration
void StoreData(DatasetIdentifier dataSetIdentifier, IDictionary<string, StorageEntryInfo> storageEntriesInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.Collections.Generic.IDictionary<System.String, StorageEntryInfo> | storageEntriesInfo |
StoreData(DatasetIdentifier, String, StorageEntryInfo)
Store cache data in the persistence provider. Used for both add and update operations.
Declaration
void StoreData(DatasetIdentifier dataSetIdentifier, string key, StorageEntryInfo storageEntryInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| DatasetIdentifier | dataSetIdentifier | |
| System.String | key | Keys of the items to be loaded. |
| StorageEntryInfo | storageEntryInfo |
TestConnection()
Checks store connection.
Declaration
void TestConnection()
VerifyStore()
Checks if the store already exists.
Declaration
void VerifyStore()