com.atlassian.jira.user
Class CachingExternalEntityStore
java.lang.Object
com.atlassian.jira.user.CachingExternalEntityStore
- All Implemented Interfaces:
- ExternalEntityStore
public class CachingExternalEntityStore
- extends Object
- implements ExternalEntityStore
A caching wrapper around the delegateEntityStore.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nameIdMap
protected final ConcurrentHashMap<String,Long> nameIdMap
CachingExternalEntityStore
public CachingExternalEntityStore(ExternalEntityStore delegateEntityStore)
- Creates a new instance of this class wrapping and caching the given
ExternalEntityStore
- Parameters:
delegateEntityStore
- ExternalEntityStore to cache and delegate to
onClearCache
@EventListener
public void onClearCache(ClearCacheEvent event)
createIfDoesNotExist
public Long createIfDoesNotExist(String name)
throws IllegalArgumentException
- Checks the cache first and if does not exist in the cache, delegates to the wrapped entity store.
- Specified by:
createIfDoesNotExist
in interface ExternalEntityStore
- Parameters:
name
- profile name to create
- Returns:
- Long id, this is the created or existing id for the name.
- Throws:
IllegalArgumentException
- if the given name is null
Copyright © 2002-2013 Atlassian. All Rights Reserved.