Method GetHashSet
GetHashSet<T>(String, ReadThruOptions)
Gets Distributed Set interface against the provided collection name.
Declaration
IDistributedHashSet<T> GetHashSet<T>(string key, ReadThruOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of collection. |
ReadThruOptions | options | ReadThruOptions to read from data source. These can be either ReadThru, ReadThruForced or none. |
Returns
Type | Description |
---|---|
IDistributedHashSet<T> | Interface for using set. |
Type Parameters
Name | Description |
---|---|
T | Type of Set items. |
Examples
The following code sample shows how to get a Distributed Set handler from cache.
ICache cache = CacheManager.GetCache("demoCache");
string dataTypeName = "DistributedSet";
IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet<int>(dataTypeName);