public interface ICache
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_AUTO_DELAY_EXPIRATION |
static long |
DEFAULT_AVG_ENTRY_SIZE |
static String |
DEFAULT_CACHE_CLASS |
static String |
DEFAULT_CACHE_TYPE |
static int |
DEFAULT_CAPACITY |
static boolean |
DEFAULT_CLEAR_CACHE_ON_INIT |
static String |
DEFAULT_FILE_PREFIX |
static String |
DEFAULT_FOLDER |
static long |
DEFAULT_MAX_CACHE_SIZE |
static long |
DEFAULT_MAX_ENTRY_SIZE |
static boolean |
DEFAULT_SECURE |
static boolean |
DEFAULT_SINGLETON |
static String |
DEFAULT_STORAGE_CLASS |
static int |
DEFAULT_TIME_TO_LIVE |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(ICacheEntry entry)
add a new entry to the cache
|
void |
addEntry(String key,
Object object)
create a new entry and add it to the cache
|
void |
addEntry(String key,
Object object,
int timeToLive)
create a new entry and add it to the cache
|
void |
addEntry(String key,
Object object,
int timeToLive,
long size)
create a new entry and add it to the cache
|
void |
addEntryAutoDelay(String key,
Object object,
int timeToLive)
create a new entry and add it to the cache - on access the expiration is
delayed by timeToLive
|
void |
addEntryAutoDelay(String key,
Object object,
int timeToLive,
long size)
create a new entry and add it to the cache - on access the expiration is
delayed by timeToLive
|
void |
clearCache()
remove all entries from the cache
|
boolean |
containsEntry(String key)
check, whether an entry with the key is stored in the cache
|
CacheEntryList |
elements() |
int |
getCapacity() |
ICacheEntry |
getEntry(String key)
get an entry from the cache
|
String |
getID()
get the cache ID
|
long |
getMaxEntrySize() |
Enumeration |
keys()
Deprecated.
as of NW04. Use keySet() instead
|
Set |
keySet()
Returns a setview on the current set of keys of all entries.
|
void |
refresh()
remove all expired entries
|
boolean |
removeEntriesOlderThan(long timestamp)
remove all entries from the cache with modification date older than the
given timestamp.
|
boolean |
removeEntriesStartingWith(String prefix)
remove all entries from the cache which's keys start with a specific prefix
|
boolean |
removeEntry(ICacheEntry entry)
remove an entry from the cache
|
boolean |
removeEntry(String key)
remove an entry from the cache
|
static final String DEFAULT_CACHE_TYPE
static final String DEFAULT_CACHE_CLASS
static final int DEFAULT_CAPACITY
static final long DEFAULT_MAX_CACHE_SIZE
static final long DEFAULT_MAX_ENTRY_SIZE
static final long DEFAULT_AVG_ENTRY_SIZE
static final int DEFAULT_TIME_TO_LIVE
static final String DEFAULT_STORAGE_CLASS
static final String DEFAULT_FOLDER
static final String DEFAULT_FILE_PREFIX
static final boolean DEFAULT_SECURE
static final boolean DEFAULT_CLEAR_CACHE_ON_INIT
static final boolean DEFAULT_SINGLETON
static final boolean DEFAULT_AUTO_DELAY_EXPIRATION
void addEntry(ICacheEntry entry) throws CacheException
entry - new entryCacheException - Exception raised in failure situationvoid addEntry(String key, Object object) throws CacheException
key - key of the new entryobject - object of the new entryCacheException - Exception raised in failure situationvoid addEntry(String key, Object object, int timeToLive) throws CacheException
key - key of the new entryobject - object of the new entrytimeToLive - after this time (in seconds) the entry is removed from
the cacheCacheException - Exception raised in failure situationvoid addEntryAutoDelay(String key, Object object, int timeToLive) throws CacheException
key - key of the new entryobject - object of the new entrytimeToLive - after this time (in seconds) the entry is removed from
the cacheCacheException - Exception raised in failure situationvoid addEntry(String key, Object object, int timeToLive, long size) throws CacheException
key - key of the new entryobject - object of the new entrytimeToLive - after this time (in seconds) the entry is removed from
the cachesize - supposed size of the object (in bytes) (may be ignored in
persistent caches)CacheException - Exception raised in failure situationvoid addEntryAutoDelay(String key, Object object, int timeToLive, long size) throws CacheException
key - key of the new entryobject - object of the new entrytimeToLive - after this time (in seconds) the entry is removed from
the cachesize - supposed size of the object (in bytes) (may be ignored in
persistent caches)CacheException - Exception raised in failure situationString getID()
ICacheEntry getEntry(String key) throws CacheException
key - key of the entryCacheException - Exception raised in failure situationboolean removeEntry(ICacheEntry entry) throws CacheException
entry - entry to be removedCacheException - Exception raised in failure situationboolean removeEntry(String key) throws CacheException
key - key of the entryCacheException - Exception raised in failure situationboolean removeEntriesStartingWith(String prefix) throws CacheException
prefix - TBD: Description of the incoming method parameterCacheException - Exception raised in failure situationboolean removeEntriesOlderThan(long timestamp)
throws CacheException
timestamp - the compare the modification dates withCacheExceptionboolean containsEntry(String key) throws CacheException
key - key of the entryCacheException - Exception raised in failure situationEnumeration keys() throws CacheException
CacheException - Exception raised in failure situationSet keySet() throws CacheException
CacheException - Exception raised in failure situationCacheEntryList elements() throws CacheException
CacheException - Exception raised in failure situationvoid clearCache()
throws CacheException
CacheException - Exception raised in failure situationvoid refresh()
throws CacheException
CacheException - Exception raised in failure situationint getCapacity()
long getMaxEntrySize()
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2017 SAP AG Complete Copyright Notice