|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.netobjects.CacheTable
public class CacheTable
A CacheTable
is used to cache the entries of the database.
Field Summary | |
---|---|
protected java.lang.String |
cacheName
|
protected scone.netobjects.CacheTable.Cleaner |
cleaner
|
static boolean |
DEBUG
|
static int |
EAGERGC
|
protected java.util.Hashtable[] |
entities
|
protected int |
gcType
|
static int |
LAZYGC
|
protected java.lang.Object |
lock
|
protected int |
noOfKeys
|
protected int |
timeTillCleanUp
|
Constructor Summary | |
---|---|
CacheTable(java.lang.String cacheName,
int noOfKeys,
int timeTillCleanUp,
int gcType)
Create a new CacheTable with noOfKeys HashTables to access Data. |
|
CacheTable(java.lang.String cacheName,
int noOfKeys,
int timeTillCleanUp,
int gcType,
int capacity)
Create a new CacheTable with noOfKeys HashTables to access Data. |
Method Summary | |
---|---|
void |
clean()
Clean is called to store all elements of the cache to the database. |
Cacheable |
get(int keyNo,
java.lang.Object key)
get an Object from the Cache |
void |
put(Cacheable entity)
Put an entity into CacheTable |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LAZYGC
public static final int EAGERGC
public static final boolean DEBUG
protected java.lang.String cacheName
protected java.lang.Object lock
protected java.util.Hashtable[] entities
protected int noOfKeys
protected int gcType
protected int timeTillCleanUp
protected scone.netobjects.CacheTable.Cleaner cleaner
Constructor Detail |
---|
public CacheTable(java.lang.String cacheName, int noOfKeys, int timeTillCleanUp, int gcType)
cacheName
- name of the cache, i.e., cached objects.noOfKeys
- how many keys aretimeTillCleanUp
- time between storing cache dataint
- gcType this value is either LAZYGC: objects are removed if memory runs out or with EAGERGC as soon as possiblepublic CacheTable(java.lang.String cacheName, int noOfKeys, int timeTillCleanUp, int gcType, int capacity)
cacheName
- name of the cache, i.e., cached objects.noOfKeys
- how many keys aretimeTillCleanUp
- time between storing cache dataint
- gcType this value is either LAZYGC: objects are removed if memory runs out or with EAGERGC as soon as possibleint
- capacity initial capacity of cache for this type of objects...Method Detail |
---|
public void shutdown()
public void put(Cacheable entity)
entity
- the object to be saved in cache.public Cacheable get(int keyNo, java.lang.Object key)
keyNo
- the number of the key to acces the entrykey
- the key associated with the object.public void clean()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |