com.atlassian.jira.issue.statistics.util
Class CachingStatisticsMapper

java.lang.Object
  extended by com.atlassian.jira.issue.statistics.util.StatisticsMapperWrapper
      extended by 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


Constructor Summary
CachingStatisticsMapper(StatisticsMapper statisticsMapper)
           
 
Method Summary
 java.lang.Object getValueFromLuceneField(java.lang.String documentValue)
          As lookups may be expensive, we cache the String->Object values in a cache
 
Methods inherited from class com.atlassian.jira.issue.statistics.util.StatisticsMapperWrapper
getComparator, getDocumentConstant, getSearchUrlSuffix, isFieldAlwaysPartOfAnIssue, isValidValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.search.LuceneFieldSorter
equals, hashCode
 

Constructor Detail

CachingStatisticsMapper

public CachingStatisticsMapper(StatisticsMapper statisticsMapper)
Method Detail

getValueFromLuceneField

public java.lang.Object getValueFromLuceneField(java.lang.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-2010 Atlassian. All Rights Reserved.