Interface IReadThruProvider
Contains methods used to read an object by its key from the master data source. Must be implemented by read-through components.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
public interface IReadThruProvider
Dispose()
Perform tasks associated with freeing, releasing, or resetting resources.
Declaration
void Dispose()
Init(IDictionary, String)
Perform tasks like allocating resources or acquiring connections etc.
Declaration
void Init(IDictionary parameters, string cacheId)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IDictionary | parameters | Startup paramters defined in the configuration |
System.String | cacheId | Id of the Cache |
LoadFromSource(String, out ProviderCacheItem)
Responsible for loading the object from the data source. Key is passed as parameter.
Declaration
void LoadFromSource(string key, out ProviderCacheItem cacheItem)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | key used to refernece object |
ProviderCacheItem | cacheItem |
LoadFromSource(String[])
Responsible for loading array of objects from the data source. Keys are passed as parameter.
Declaration
Dictionary<string, ProviderCacheItem> LoadFromSource(string[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | keys | array of keys |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, ProviderCacheItem> |