com.atlassian.confluence.user
Class CachingConfluenceUserPropertySetFactory

java.lang.Object
  extended by com.atlassian.user.impl.cache.properties.CachingPropertySetFactory
      extended by com.atlassian.confluence.user.CachingConfluenceUserPropertySetFactory
All Implemented Interfaces:
com.atlassian.user.properties.PropertySetFactory

public class CachingConfluenceUserPropertySetFactory
extends com.atlassian.user.impl.cache.properties.CachingPropertySetFactory

A PropertySetFactory specific for ConfluenceUsers that wraps another PropertySetFactory and maintains a cache of its PropertySets. This prevents the need for PropertySets to be looked up repeatedly from the wrapped PropertySetFactory. Retrieved PropertySets are also wrapped in a CachedPropertySet so that individual property values are cached instead of repeatedly retrieved. Both levels of caching rewrite to the cache whenever a setter is called on a PropertySet.

The cache is keyed purely on entity name, so it assumes all entities used have unique names, even across entity types.

Since the decorated PropertySets retrieved from the underlyingPropertySetFactory are cached they must be Serializable.

This class extends CachingPropertySetFactory only for backwards compatibility.

Since:
v5.3

Field Summary
static java.lang.String PROPERTY_SETS_REFERENCES_CACHE
           
 
Constructor Summary
CachingConfluenceUserPropertySetFactory(com.atlassian.user.properties.PropertySetFactory underlyingPropertySetFactory, com.atlassian.cache.CacheFactory cacheFactory)
           
 
Method Summary
 com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.user.Entity entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_SETS_REFERENCES_CACHE

public static final java.lang.String PROPERTY_SETS_REFERENCES_CACHE
Constructor Detail

CachingConfluenceUserPropertySetFactory

public CachingConfluenceUserPropertySetFactory(com.atlassian.user.properties.PropertySetFactory underlyingPropertySetFactory,
                                               com.atlassian.cache.CacheFactory cacheFactory)
Method Detail

getPropertySet

public com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.user.Entity entity)
                                                               throws com.atlassian.user.EntityException
Specified by:
getPropertySet in interface com.atlassian.user.properties.PropertySetFactory
Overrides:
getPropertySet in class com.atlassian.user.impl.cache.properties.CachingPropertySetFactory
Throws:
com.atlassian.user.EntityException


Copyright © 2003-2014 Atlassian. All Rights Reserved.