Configuring Read-Through Provider
This feature is only available in NCache Enterprise Edition.
Read-Through provider can be configured in following ways:
For Java, before deploying your JAR files, you need to make sure that:
- You have JDK 11 installed
- Your Environment Variable for Java is set
Using NCache Web Manager
Launch NCache Web Manager by browsing to
<server-ip>:8251(Windows + Linux).
In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to which backing source will be configured. Against the cache name, click on View Details.
Make sure that the cache is stopped.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Backing Source in the left bar.
Check the Enable Read Through box. Select + Add Provider.
- A new page will open up. Enter the Provider Name in the text box and then click on the "..." button to browse for assembly implementing
IReadThruProviderinterface. Select the class name from the drop down list.
- Select the required Read-Through provider. You can also provide the values to your read-through provider class, if required. Just write the parameter name in Parameter field and its value against it under the Value field.
Selected provider class will be listed in Read-Through provider list at Backing Source tab.
Now deploy the read-through provider assembly along with its dependency assemblies, if any. Click on the Deploy Backing Source Provider button at the left bottom of the Backing Source tab.
Browse for required assemblies.
Select all the required assemblies and click Open.
- After applying all the changes click on Save Changes.
Add-BackingSource cmdlet enable users to configure backing source (read-through, write-through) providers for the specified cache.
The following Command will configure Reader1 read-through provider on demoClusteredCache.
Add-BackingSource demoClusteredCache AssemblyName C:\Providers\Providers.dll -Class NCache.Sample.Providers.Readers.Reader1 -ProviderName reader1 -ReadThru
Remove-BackingSource cmdlet removes the pre-configured backing source providers (read-through or write-through) from the cache or a specified server.
The following command removes the pre-configured read-through provider named MyReader from demoClusteredCache.
Remove-BackingSource -CacheName demoClusteredCache -ProviderName MyReader –ReadThru