com.sap.portal.prt.service.cache

Interface IPRTCacheService

All Superinterfaces:
IService

public interface IPRTCacheService
extends IService

The PRT Cache service is mainly a wrapper of the jcache api that handles the PRT cache It is used by the core of the PRT


Field Summary
static String KEY
           
 
Method Summary
 void addCacheContent(ICacheContent cacheContent)
          Adds a new CacheContent instance
 ICacheContent getCacheContent(String componentName, CachingLevel cachingLevel, String cachingLevelKey, String key)
          Gets a cache content instance The instance can be either loaded from the database via the database cache loader or be retrieved from memory
 void initiate(String componentName)
          Initiates the cache for a component (i.e. creates the groups and subgroups)
 void invalidate(ICacheContent cacheContent)
          Invalidates a cache content (performs cluster notification)
 void invalidateCacheContent(ICacheContent cacheContent)
          Invalidates the cache content instance and sends a notification to all the clusters Note : this method acquires and releases a read lock on the supplied cache content instance
 void invalidateDB()
          Deprecated. Invalidates all the database entries for prt the region. Won't be supported when using CML
 void invalidateDB(ICacheContent cacheContent)
          Deprecated. Invalidates a cache entry in the db. Won't be supported when using CML
 void invalidateLocally(ICacheContent cacheContent)
          Invalidates a cache content locally (don't notify the clusters) Note : this method acquires and releases a read lock on the cache content instance
 void invalidateLocally(String componentName)
          Invalidates the cache for a component locally (don't notify the clusters)
 void invalidateLocally(String componentName, CachingLevel cachingLevel)
          Invalidates the cache for a component for a caching level locally (don't notify the clusters)
 void invalidateLocally(String componentName, CachingLevel cachingLevel, String cachingLevelKey)
          Invalidates the cache for a component with a caching level and a cachinglevel key locally (don't notify the clusters)
 void replaceCacheContent(ICacheContent newCacheContent)
          Replaces the cache content, this method will send an invalidation through the clusters Note : this method acquires and releases a read lock on the supplied cache content
 
Methods inherited from interface com.sapportals.portal.prt.service.IService
afterInit, configure, destroy, getContext, getKey, init, release
 

Field Detail

KEY

static final String KEY
See Also:
Constant Field Values
Method Detail

addCacheContent

void addCacheContent(ICacheContent cacheContent)
                     throws CacheContentExistsException
Adds a new CacheContent instance

Parameters:
cacheContent - the new CacheContent instance
Throws:
CacheContentExistsException

getCacheContent

ICacheContent getCacheContent(String componentName,
                              CachingLevel cachingLevel,
                              String cachingLevelKey,
                              String key)
Gets a cache content instance The instance can be either loaded from the database via the database cache loader or be retrieved from memory

Parameters:
componentName - the component name
cachingLevel - the caching level
cachingLevelKey - the caching level key (can be null)
key - the key
Returns:
a cache content instance or null if the entry has not been added

replaceCacheContent

void replaceCacheContent(ICacheContent newCacheContent)
Replaces the cache content, this method will send an invalidation through the clusters Note : this method acquires and releases a read lock on the supplied cache content

Parameters:
newICacheContent - the new ICacheContent instance that will replace the old one

initiate

void initiate(String componentName)
Initiates the cache for a component (i.e. creates the groups and subgroups)

Parameters:
componentName, - the component name

invalidateCacheContent

void invalidateCacheContent(ICacheContent cacheContent)
Invalidates the cache content instance and sends a notification to all the clusters Note : this method acquires and releases a read lock on the supplied cache content instance

Parameters:
cacheContent - the new ICacheContent instance

invalidateLocally

void invalidateLocally(String componentName)
Invalidates the cache for a component locally (don't notify the clusters)

Parameters:
componentName, - the component name

invalidateLocally

void invalidateLocally(String componentName,
                       CachingLevel cachingLevel)
Invalidates the cache for a component for a caching level locally (don't notify the clusters)

Parameters:
componentName - the component name
cachingLevel - the caching level

invalidateLocally

void invalidateLocally(String componentName,
                       CachingLevel cachingLevel,
                       String cachingLevelKey)
Invalidates the cache for a component with a caching level and a cachinglevel key locally (don't notify the clusters)


invalidateLocally

void invalidateLocally(ICacheContent cacheContent)
Invalidates a cache content locally (don't notify the clusters) Note : this method acquires and releases a read lock on the cache content instance


invalidate

void invalidate(ICacheContent cacheContent)
Invalidates a cache content (performs cluster notification)


invalidateDB

void invalidateDB(ICacheContent cacheContent)
Deprecated. Invalidates a cache entry in the db. Won't be supported when using CML


invalidateDB

void invalidateDB()
Deprecated. Invalidates all the database entries for prt the region. Won't be supported when using CML

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] epbc.prtapi._coreservicedeprecated default EP-PIN-PRT
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/lib/api api EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/prt/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice