|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBSubsetCache
public final class DBSubsetCache
Local Cache for DBSubset Objects
| Nested Class Summary | |
|---|---|
class |
DBSubsetCache.DBCacheEntry
|
| Field Summary | |
|---|---|
int |
iTopIndex
|
int |
iUsed
|
| Constructor Summary | |
|---|---|
DBSubsetCache()
Default constructor Cache capacity is set to 100 |
|
DBSubsetCache(int iCapacity)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int iTopIndex
public int iUsed
| Constructor Detail |
|---|
public DBSubsetCache()
Default constructor
Cache capacity is set to 100
public DBSubsetCache(int iCapacity)
iCapacity - Maximum number of entries that cache can hold| Method Detail |
|---|
public 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 entry
public 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 entry
public DBSubsetCache.DBCacheEntry getEntry(java.lang.String sKey)
sKey - Unique key for cache entry
public java.lang.String getKey(int iEntryIndex)
public void setKey(java.lang.String sKey,
int iEntryIndex)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||