Package org.gcube.informationsystem.cache

Introduction

See: Description

Package org.gcube.informationsystem.cache Description

Introduction

The only artifacts users need to pay attention to are the ISCache and ISCacheManager classes. In the beginning use the ISCacheManager.initialize() method, which initializes the ISCache environment. Users can access the ISCache object, using ISCacheManager.getCache() method. Then they can invoke the methods defined in the ISCache class and manage the cache information. There are 2 noteworthy factors regarding the cache architecture.

It's inherently, completely, uniquely, utterly dynamic
cache consistency components may be added/deleted at runtime without affecting the system. In matter of fact, one can change the consistency component at runtime keeping all of its previous cached information. From the user perspective all the mechanics are completely transparent.
It's JMX-enabled
This means that ISCache has all the advantages of JMX, in terms of management and monitoring

Examples of Usage

Simple Usage

ISCacheManager.addManager(GCUBEScope.getScope("/gcube/devsec"));
ISCacheManager.addManager(GCUBEScope.getScope("/gcube/devsec"));
ISCacheManager.delManager(GCUBEScope.getScope("/gcube/testing"));
ISCacheManager.addManager(GCUBEScope.getScope("/gcube/devsec"));
ISCacheManager.getManager(GCUBEScope.getScope("/gcube/devsec")).cache.getEPRsFor("MetadataManagement", "XMLIndexer", "FACTORY") :: String[]
ISCacheManager.getManager(GCUBEScope.getScope("/gcube/devsec")).cache.getEPRsFor("MetadataManagement", "XMLIndexer", "STATEFULL") :: String[]
ISCacheManager.getManager(GCUBEScope.getScope("/gcube/devsec")).cache.addFilterCriterion("MetadataManagement", "XMLIndexer", "STATEFULL", "/child::*[local-name()='AccessType']", "GCUBEDaix");
ISCacheManager.getManager(GCUBEScope.getScope("/gcube/devsec")).cache.getEPRsFor("MetadataManagement", "XMLIndexer", "STATEFULL") :: String[]
ISCacheManager.getManager(GCUBEScope.getScope("/gcube/devsec")).cache.getEPRsFor("Personalisation", "UserProfileAccess", "SIMPLE") :: String[]

Management & Monitoring

In order to see the current state of ISCache (registered services, corresponding RIs, execution statistics, etc), you can use JConsole (just type 'jconsole' in your command prompt. ISCache is fully JMX-enabled and thus can be configured and monitored at runtime.