public final class DefaultApplicationCache extends Object implements ApplicationCache
ApplicationCache that delegates to CacheFactory
for caching. The key for each entry is a lower-case version of the name and the value is an
immutable copy of the Application.ApplicationCache.Loader| Constructor and Description |
|---|
DefaultApplicationCache(com.atlassian.cache.CacheFactory cacheFactory,
com.atlassian.event.api.EventPublisher eventPublisher)
Deprecated.
|
DefaultApplicationCache(TransactionAwareCacheFactory cacheFactory,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
directoryUpdated(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent directoryUpdatedEvent) |
com.atlassian.crowd.model.application.Application |
getApplication(String name)
Returns the cached application with the given name, or null if the application isn't cached.
|
com.atlassian.crowd.model.application.Application |
getApplication(String name,
ApplicationCache.Loader loader)
Returns the cached application with the given name, or null if the application isn't cached.
|
void |
init() |
void |
putApplication(com.atlassian.crowd.model.application.Application application)
Caches the application against its name, as returned by
Application.getName(). |
void |
removeAll()
Removes all entries from the cache.
|
void |
removeApplication(String name)
Removes the application with the given name from the cache.
|
static <T extends Exception> |
unwrapOrRethrow(RuntimeException ex,
Class<T> expectedType)
Look throw the causal chain until we find an exception that is of the expected type, or just rethrow the full chain if not.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveApplicationpublic DefaultApplicationCache(TransactionAwareCacheFactory cacheFactory, com.atlassian.event.api.EventPublisher eventPublisher)
@Deprecated public DefaultApplicationCache(com.atlassian.cache.CacheFactory cacheFactory, com.atlassian.event.api.EventPublisher eventPublisher)
DefaultApplicationCache(TransactionAwareCacheFactory, EventPublisher)@PostConstruct public void init()
@EventListener public void directoryUpdated(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent directoryUpdatedEvent)
public com.atlassian.crowd.model.application.Application getApplication(String name)
ApplicationCachegetApplication in interface ApplicationCachepublic com.atlassian.crowd.model.application.Application getApplication(String name, ApplicationCache.Loader loader) throws com.atlassian.crowd.exception.ApplicationNotFoundException
ApplicationCachegetApplication in interface ApplicationCachecom.atlassian.crowd.exception.ApplicationNotFoundExceptionpublic static <T extends Exception> T unwrapOrRethrow(RuntimeException ex, Class<T> expectedType)
public void putApplication(com.atlassian.crowd.model.application.Application application)
ApplicationCacheApplication.getName().putApplication in interface ApplicationCachepublic void removeApplication(String name)
ApplicationCacheremoveApplication in interface ApplicationCachepublic void removeAll()
ApplicationCacheremoveAll in interface ApplicationCacheCopyright © 2003–2022 Atlassian. All rights reserved.