public final class DBSubsetCache
extends java.lang.Object
Local Cache for DBSubset Objects
Modifier and Type | Class and Description |
---|---|
class |
DBSubsetCache.DBCacheEntry |
Constructor and Description |
---|
DBSubsetCache()
Default constructor
Cache capacity is set to 100
|
DBSubsetCache(int iCapacity) |
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Get Maximum number of entries that cache can hold
|
void |
clear()
Clear cache
|
void |
clear(java.lang.String sTable)
Remove all entries from cache that are registers from a given table
|
boolean |
expire(java.lang.String sKey)
Remove a cache entry
|
DBSubset |
get(java.lang.String sKey)
Get DBSubset from cache
|
DBSubsetCache.DBCacheEntry |
getEntry(java.lang.String sKey)
Get DBCacheEntry from cache
|
java.lang.String |
getKey(int iEntryIndex) |
void |
put(java.lang.String sTableName,
java.lang.String sKey,
DBSubset oDBSS)
Add new entry to cache
|
void |
replace(java.lang.String sTableName,
java.lang.String sKey,
DBSubset oDBSS)
Replace a cache entry
|
void |
setKey(java.lang.String sKey,
int iEntryIndex) |
public DBSubsetCache()
Default constructor
Cache capacity is set to 100public DBSubsetCache(int iCapacity)
iCapacity
- Maximum number of entries that cache can holdpublic int capacity()
public void put(java.lang.String sTableName, java.lang.String sKey, DBSubset oDBSS)
sTableName
- Associated table (optional)sKey
- Unique key for cache entryoDBSS
- Stored DBSubsetpublic boolean expire(java.lang.String sKey)
sKey
- Unique key for cache entrypublic void replace(java.lang.String sTableName, java.lang.String sKey, DBSubset oDBSS)
sTableName
- Associated table (optional)sKey
- Unique key for cache entryoDBSS
- New DBSubset to be storedpublic void clear()
public void clear(java.lang.String sTable)
sTable
- Table Namepublic DBSubset get(java.lang.String sKey)
sKey
- Unique key for cache entrypublic DBSubsetCache.DBCacheEntry getEntry(java.lang.String sKey)
sKey
- Unique key for cache entrypublic java.lang.String getKey(int iEntryIndex)
public void setKey(java.lang.String sKey, int iEntryIndex)