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
.Constructor and Description |
---|
DefaultApplicationCache(com.atlassian.cache.CacheFactory 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.
|
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.
|
public DefaultApplicationCache(com.atlassian.cache.CacheFactory cacheFactory, com.atlassian.event.api.EventPublisher 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)
ApplicationCache
getApplication
in interface ApplicationCache
public void putApplication(com.atlassian.crowd.model.application.Application application)
ApplicationCache
Application.getName()
.putApplication
in interface ApplicationCache
public void removeApplication(String name)
ApplicationCache
removeApplication
in interface ApplicationCache
public void removeAll()
ApplicationCache
removeAll
in interface ApplicationCache
Copyright © 2003–2020 Atlassian. All rights reserved.