com.atlassian.jira.issue.statistics.util
Class CachingStatisticsMapper
java.lang.Object
com.atlassian.jira.issue.statistics.util.StatisticsMapperWrapper
com.atlassian.jira.issue.statistics.util.CachingStatisticsMapper
- All Implemented Interfaces:
- LuceneFieldSorter, StatisticsMapper
public class CachingStatisticsMapper
- extends StatisticsMapperWrapper
A statisticsMapper that caches the return value from getValueFromLuceneField(String)
in an internal
cache.
As the cache is not bounded, this object should not be stored for longer than a request
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachingStatisticsMapper
public CachingStatisticsMapper(StatisticsMapper statisticsMapper)
getValueFromLuceneField
public Object getValueFromLuceneField(String documentValue)
- As lookups may be expensive, we cache the String->Object values in a cache
- Specified by:
getValueFromLuceneField
in interface LuceneFieldSorter
- Overrides:
getValueFromLuceneField
in class StatisticsMapperWrapper
- Parameters:
documentValue
- The value of the field in the lucene index
- Returns:
- The value that will be passed to the display
Copyright © 2002-2011 Atlassian. All Rights Reserved.