com.atlassian.jira.issue.fields.config.manager
Class CachedFieldConfigSchemeManagerImpl

java.lang.Object
  extended by com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl
      extended by com.atlassian.jira.issue.fields.config.manager.CachedFieldConfigSchemeManagerImpl
All Implemented Interfaces:
Startable, FieldConfigSchemeManager, JiraCachedManager

public class CachedFieldConfigSchemeManagerImpl
extends FieldConfigSchemeManagerImpl
implements JiraCachedManager, Startable

Simple caching wrapper.

NOTE : you may be wondering about the cache invalidation strategy on this cache. Will the top level classes that use this cache such as com.atlassian.jira.issue.CustomFieldManager@refreshCache call init() and this clears the cache.

TODO: This probably should be rewritten so that the upper lays of code are not responsible for clearing the lower level caches and also the "cache inheritance" pattern should be removed. *


Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManager
ALL_ISSUE_TYPES
 
Constructor Summary
CachedFieldConfigSchemeManagerImpl(FieldConfigSchemePersister configSchemePersister, FieldConfigContextPersister contextPersister, JiraContextTreeManager treeManager, FieldConfigManager configManager, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 long getCacheSize()
           
 java.lang.Object getValue(com.atlassian.bandana.BandanaContext context, java.lang.String key, boolean lookUp)
           
 void init()
           
 void onClearCache(ClearCacheEvent event)
           
 void refreshCache()
           
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class com.atlassian.jira.issue.fields.config.manager.FieldConfigSchemeManagerImpl
createDefaultScheme, createDefaultScheme, createFieldConfigScheme, getAssociatedProjects, getConfigSchemeForFieldConfig, getConfigSchemesForField, getFieldConfigScheme, getInvalidFieldConfigSchemesForIssueTypeRemoval, getRelevantConfig, getRelevantConfigScheme, getValue, removeFieldConfigScheme, removeInvalidFieldConfigSchemesForCustomField, removeInvalidFieldConfigSchemesForIssueType, removeSchemeAssociation, setValue, updateFieldConfigScheme, updateFieldConfigScheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedFieldConfigSchemeManagerImpl

public CachedFieldConfigSchemeManagerImpl(FieldConfigSchemePersister configSchemePersister,
                                          FieldConfigContextPersister contextPersister,
                                          JiraContextTreeManager treeManager,
                                          FieldConfigManager configManager,
                                          com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

init

public void init()
Specified by:
init in interface FieldConfigSchemeManager
Overrides:
init in class FieldConfigSchemeManagerImpl

start

public void start()
           throws java.lang.Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
java.lang.Exception - Allows implementations to throw an Exception.

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

getValue

public java.lang.Object getValue(com.atlassian.bandana.BandanaContext context,
                                 java.lang.String key,
                                 boolean lookUp)
Specified by:
getValue in interface FieldConfigSchemeManager
Overrides:
getValue in class FieldConfigSchemeManagerImpl

getCacheSize

public long getCacheSize()
Specified by:
getCacheSize in interface JiraCachedManager

refreshCache

public void refreshCache()
Specified by:
refreshCache in interface JiraCachedManager


Copyright © 2002-2010 Atlassian. All Rights Reserved.