|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlecho.palomar.cache.AbstractCache
Abstract class for common implementations of IrisCache.
| Field Summary | |
protected java.lang.String |
_type
identifier for this cache |
protected long |
lastRefreshTime
|
protected java.util.Properties |
myProperties
|
protected long |
refreshFrequency
Refresh frequency. |
| Constructor Summary | |
AbstractCache()
|
|
| Method Summary | |
java.lang.String |
getCacheDir()
returns the directory to be used for caching |
java.lang.String |
getCronExpr()
get cron expression for this job, returns a empty string as all cache jobs are type refreshable i.e. |
java.lang.String |
getJobGroupName()
get group name for this cron job, several jobs can belong to a group |
java.lang.String |
getJobName()
get name for this cron job |
java.util.Iterator |
getKeys(java.util.Map typeMap)
Method for getting an Iterator on keys for a particular Collection object |
int |
getMaxCacheSize()
returns the maximum holding capacity of this cache instance |
long |
getNextRefreshTime()
Returns the next refreshing time in milliseconds from now |
java.util.Iterator |
getObjects(java.util.Map typeMap)
Method for getting an Iterator on values for a particular Collection object |
java.util.Properties |
getProperties()
Return the characteristics of a specific implementation of IrisCache |
long |
getRefreshFreq()
|
long |
getRefreshInterval()
get refresh interval for this cache |
java.lang.String |
getType()
Get the object type this cache is holding |
boolean |
isEmpty(java.util.Map typeMap)
Method for testing the capacity of a passed Map. |
boolean |
isTimeToRefresh()
Checks to see if it is the right time to refresh |
void |
runJob()
run this cron job |
void |
setMaxCacheSize(int maxCacheSize)
setter for maximum capacity this cache can hold |
void |
setRefreshFreq(long refreshFrequency)
The default refresh period |
protected void |
setRefreshTime(long refreshedAt)
|
protected void |
setType(java.lang.String type)
Set the object type this cache has to hold |
protected boolean |
shouldNotify(java.lang.String cacheName)
|
protected void |
trimProperties(java.util.Properties initialProperties)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xmlecho.palomar.cache.Cache |
clear, get, invalidate, put, putMutable, remove, setProperties |
| Methods inherited from interface org.xmlecho.palomar.cron.Refreshable |
getRunnable, refresh, willWantRefresh |
| Field Detail |
protected long refreshFrequency
protected java.lang.String _type
protected long lastRefreshTime
protected java.util.Properties myProperties
| Constructor Detail |
public AbstractCache()
| Method Detail |
public boolean isTimeToRefresh()
isTimeToRefresh in interface org.xmlecho.palomar.cron.Refreshablepublic java.lang.String getType()
getType in interface Cacheprotected void setType(java.lang.String type)
type - can only be set by subclassespublic long getNextRefreshTime()
getNextRefreshTime in interface org.xmlecho.palomar.cron.Refreshableprotected void setRefreshTime(long refreshedAt)
public void setRefreshFreq(long refreshFrequency)
Cache
setRefreshFreq in interface Cachepublic long getRefreshFreq()
public void setMaxCacheSize(int maxCacheSize)
Cache
setMaxCacheSize in interface Cachepublic int getMaxCacheSize()
Cache
getMaxCacheSize in interface Cachepublic java.lang.String getCacheDir()
getCacheDir in interface Cacheprotected void trimProperties(java.util.Properties initialProperties)
public java.util.Properties getProperties()
Cache
getProperties in interface Cachepublic boolean isEmpty(java.util.Map typeMap)
typeMap - a Collection object
public java.util.Iterator getKeys(java.util.Map typeMap)
public java.util.Iterator getObjects(java.util.Map typeMap)
protected boolean shouldNotify(java.lang.String cacheName)
public long getRefreshInterval()
getRefreshInterval in interface org.xmlecho.palomar.cron.Refreshable
public void runJob()
throws java.lang.Exception
runJob in interface org.xmlecho.palomar.cron.Jobjava.lang.Exceptionpublic java.lang.String getCronExpr()
getCronExpr in interface org.xmlecho.palomar.cron.Jobpublic java.lang.String getJobName()
getJobName in interface org.xmlecho.palomar.cron.Jobpublic java.lang.String getJobGroupName()
getJobGroupName in interface org.xmlecho.palomar.cron.Job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||