|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.greenhopper.service.timetracking.WorklogHistoryCacheImpl
@Service(value="gh-worklogHistoryCache") public class WorklogHistoryCacheImpl
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.greenhopper.service.timetracking.WorklogHistoryCache |
|---|
DEFAULT_MEMORY_SIZE, SERVICE |
| Constructor Summary | |
|---|---|
WorklogHistoryCacheImpl()
|
|
| Method Summary | |
|---|---|
long |
calculateInMemorySize()
Warning: huge performance / blocking impact. |
void |
clear()
Removes all entries from the cache |
void |
destroyCache()
Destroy the backing ehcache |
net.sf.ehcache.Element |
getElement(java.lang.String issueKey)
Get the cache element for the issue key. |
long |
getMemoryStoreSize()
|
double |
getUsageRatio()
|
void |
initCache()
We'll get the configuration from the greenHopper data store, which will give us a user-defined entry or the default if there is none. |
void |
remove(java.lang.String issueKey)
|
void |
resize(int newSize)
Ehcache 1.6 doesn't allow resizing of the memory store. |
void |
setEntry(java.lang.String issueKey,
java.util.SortedMap<org.joda.time.DateMidnight,DayWorkHistory> entry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorklogHistoryCacheImpl()
| Method Detail |
|---|
public net.sf.ehcache.Element getElement(java.lang.String issueKey)
WorklogHistoryCache
getElement in interface WorklogHistoryCacheissueKey - : The issue to fetch the timeline forpublic void remove(java.lang.String issueKey)
remove in interface WorklogHistoryCache
public void setEntry(java.lang.String issueKey,
java.util.SortedMap<org.joda.time.DateMidnight,DayWorkHistory> entry)
setEntry in interface WorklogHistoryCachepublic void clear()
WorklogHistoryCache
clear in interface WorklogHistoryCachepublic long getMemoryStoreSize()
getMemoryStoreSize in interface WorklogHistoryCachepublic long calculateInMemorySize()
WorklogHistoryCache
calculateInMemorySize in interface WorklogHistoryCachepublic double getUsageRatio()
getUsageRatio in interface WorklogHistoryCachepublic void resize(int newSize)
resize in interface WorklogHistoryCachenewSize - : The maximum number of entries that the cache can hold.
public void initCache()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the backing ehcache implementation is not in a correct state
public void destroyCache()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the backing ehcache implementation is not in a correct state
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||