Class CachingStatisticsMapper

  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
 Object getValueFromLuceneField(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
equals, hashCode

Constructor Detail


public CachingStatisticsMapper(StatisticsMapper statisticsMapper)
Method Detail


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
getValueFromLuceneField in class StatisticsMapperWrapper
documentValue - The value of the field in the lucene index
The value that will be passed to the display

Copyright © 2002-2014 Atlassian. All Rights Reserved.