|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 WorklogHistoryCache
issueKey
- : 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 WorklogHistoryCache
public void clear()
WorklogHistoryCache
clear
in interface WorklogHistoryCache
public long getMemoryStoreSize()
getMemoryStoreSize
in interface WorklogHistoryCache
public long calculateInMemorySize()
WorklogHistoryCache
calculateInMemorySize
in interface WorklogHistoryCache
public double getUsageRatio()
getUsageRatio
in interface WorklogHistoryCache
public void resize(int newSize)
resize
in interface WorklogHistoryCache
newSize
- : 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 statepublic 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 |