|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.dataengine.cache.DataEngineCache
Contains a group of RowCollections that have been retrieved from the database, keyed by SQLContext. By storing results retrieved from the database in the cache, applications may be able to find the results they are looking for in the cache instead of having to fetch them from the database every time.
Constructor Summary | |
DataEngineCache(String alias)
Creates a DataEngineCache with a maximum size of 10000 and the specified system alias. |
|
DataEngineCache(String alias,
int maxSize)
Creates a new DataEngineCache. |
Method Summary | |
void |
clear()
Clears out the cache, removing all entries. |
void |
clearEstimatedSize()
Clears the estimated size of this cache's estimated RowCollections' size. |
void |
close()
Closes down this cache |
String |
getAlias()
Gets the system alias associated with this cache |
List |
getAllKeys()
Gets all the keys in the cache. |
List |
getAllValues()
Gets all the values in this cache. |
RowCollection |
getCachedRowCollection(SQLContext context)
Allow Cached RowCollections to decide if they can be used for a query. |
String |
getDescription()
Gets a text description of this cache |
long |
getEstimatedSize()
Gets the estimated number of bytes of all field values in this RowCollection take up. |
int |
getMaxSize()
Gets the maximum number of items the cache can hold. |
int |
getTimeout()
Gets the maximum number of seconds which a RowCollection can be stored in the cache and still be considered valid. |
void |
rowAltered(SQLContext context,
ExecutingContext ec,
long timestamp)
This method is invoked when a single row is deleted, inserted, or updated. |
void |
setDescription(String newDescription)
Sets a text description of this cache. |
void |
setTimeout(int seconds)
Sets the maximum number of seconds which a RowCollection can be stored in the cache and still be considered valid. |
int |
size()
Gets the number of items in the cache |
String |
toString()
Returns the description of this cache |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataEngineCache(String alias)
public DataEngineCache(String alias, int maxSize)
alias
- The system alias to which the cache correspondsmaxSize
- The maximum number of entries the cache can hold.Method Detail |
public void clear()
public void clearEstimatedSize()
public void close()
public String getAlias()
public List getAllKeys()
public List getAllValues()
public RowCollection getCachedRowCollection(SQLContext context)
context
- The SQLContext containing the alteration informationpublic String getDescription()
public long getEstimatedSize()
public final int getMaxSize()
public int getTimeout()
public void rowAltered(SQLContext context, ExecutingContext ec, long timestamp) throws CMException
context
- The SQLContext containing the alteration informationec
- The current executing contexttimestamp
- The time associated with the alteration
CMException
public void setDescription(String newDescription)
public void setTimeout(int seconds)
public int size()
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |