|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Generic cache interface.
| Field Summary | |
static boolean |
DEFAULT_AUTO_DELAY_EXPIRATION
|
static long |
DEFAULT_AVG_ENTRY_SIZE
|
static java.lang.String |
DEFAULT_CACHE_CLASS
|
static java.lang.String |
DEFAULT_CACHE_TYPE
|
static int |
DEFAULT_CAPACITY
|
static boolean |
DEFAULT_CLEAR_CACHE_ON_INIT
|
static java.lang.String |
DEFAULT_FILE_PREFIX
|
static java.lang.String |
DEFAULT_FOLDER
|
static long |
DEFAULT_MAX_CACHE_SIZE
|
static long |
DEFAULT_MAX_ENTRY_SIZE
|
static boolean |
DEFAULT_SECURE
|
static boolean |
DEFAULT_SINGLETON
|
static java.lang.String |
DEFAULT_STORAGE_CLASS
|
static int |
DEFAULT_TIME_TO_LIVE
|
| Method Summary | |
void |
addEntry(ICacheEntry entry)
add a new entry to the cache |
void |
addEntry(java.lang.String key,
java.lang.Object object)
create a new entry and add it to the cache |
void |
addEntry(java.lang.String key,
java.lang.Object object,
int timeToLive)
create a new entry and add it to the cache |
void |
addEntry(java.lang.String key,
java.lang.Object object,
int timeToLive,
long size)
create a new entry and add it to the cache |
void |
addEntryAutoDelay(java.lang.String key,
java.lang.Object object,
int timeToLive)
create a new entry and add it to the cache - on access the expiration is delayed by timeToLive |
void |
addEntryAutoDelay(java.lang.String key,
java.lang.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(java.lang.String key)
check, whether an entry with the key is stored in the cache |
CacheEntryList |
elements()
|
int |
getCapacity()
|
ICacheEntry |
getEntry(java.lang.String key)
get an entry from the cache |
java.lang.String |
getID()
get the cache ID |
long |
getMaxEntrySize()
|
java.util.Enumeration |
keys()
Deprecated. as of NW04. Use keySet() instead |
java.util.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(java.lang.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(java.lang.String key)
remove an entry from the cache |
| Field Detail |
public static final java.lang.String DEFAULT_CACHE_TYPE
public static final java.lang.String DEFAULT_CACHE_CLASS
public static final int DEFAULT_CAPACITY
public static final long DEFAULT_MAX_CACHE_SIZE
public static final long DEFAULT_MAX_ENTRY_SIZE
public static final long DEFAULT_AVG_ENTRY_SIZE
public static final int DEFAULT_TIME_TO_LIVE
public static final java.lang.String DEFAULT_STORAGE_CLASS
public static final java.lang.String DEFAULT_FOLDER
public static final java.lang.String DEFAULT_FILE_PREFIX
public static final boolean DEFAULT_SECURE
public static final boolean DEFAULT_CLEAR_CACHE_ON_INIT
public static final boolean DEFAULT_SINGLETON
public static final boolean DEFAULT_AUTO_DELAY_EXPIRATION
| Method Detail |
public void addEntry(ICacheEntry entry)
throws CacheException
entry - new entryCacheException - Exception raised in failure situation
public void addEntry(java.lang.String key,
java.lang.Object object)
throws CacheException
key - key of the new entryobject - object of the new entryCacheException - Exception raised in failure situation
public void addEntry(java.lang.String key,
java.lang.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 situation
public void addEntryAutoDelay(java.lang.String key,
java.lang.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 situation
public void addEntry(java.lang.String key,
java.lang.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 situation
public void addEntryAutoDelay(java.lang.String key,
java.lang.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 situationpublic java.lang.String getID()
public ICacheEntry getEntry(java.lang.String key)
throws CacheException
key - key of the entryCacheException - Exception raised in failure situation
public boolean removeEntry(ICacheEntry entry)
throws CacheException
entry - entry to be removedCacheException - Exception raised in failure situation
public boolean removeEntry(java.lang.String key)
throws CacheException
key - key of the entryCacheException - Exception raised in failure situation
public boolean removeEntriesStartingWith(java.lang.String prefix)
throws CacheException
prefix - TBD: Description of the incoming method parameterCacheException - Exception raised in failure situation
public boolean removeEntriesOlderThan(long timestamp)
throws CacheException
timestamp - the compare the modification dates with
public boolean containsEntry(java.lang.String key)
throws CacheException
key - key of the entryCacheException - Exception raised in failure situation
public java.util.Enumeration keys()
throws CacheException
CacheException - Exception raised in failure situation
public java.util.Set keySet()
throws CacheException
CacheException - Exception raised in failure situation
public CacheEntryList elements()
throws CacheException
CacheException - Exception raised in failure situation
public void clearCache()
throws CacheException
CacheException - Exception raised in failure situation
public void refresh()
throws CacheException
CacheException - Exception raised in failure situationpublic int getCapacity()
public long getMaxEntrySize()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||