Interface ApplicationCache
-
- All Known Implementing Classes:
DefaultApplicationCache
public interface ApplicationCacheCaches Embedded Crowd Application objects by name to avoid frequent retrieval from the database.- Since:
- 3.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceApplicationCache.LoaderCannot useFunctionhere, since we need to propagate checked exceptions.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description com.atlassian.crowd.model.application.ApplicationgetApplication(String name)Deprecated.since 7.5 UsegetApplication(String, Loader)com.atlassian.crowd.model.application.ApplicationgetApplication(String name, ApplicationCache.Loader loader)Returns the cached application with the given name, or null if the application isn't cached.voidputApplication(com.atlassian.crowd.model.application.Application application)Deprecated.since 7.5 useremoveApplication(Application)andgetApplication(String, Loader)voidremoveAll()Removes all entries from the cache.default voidremoveApplication(com.atlassian.crowd.model.application.Application application)Removes the application with the given name from the cache.voidremoveApplication(String name)Removes the application with the given name from the cache.
-
-
-
Method Detail
-
getApplication
@Deprecated com.atlassian.crowd.model.application.Application getApplication(String name)
Deprecated.since 7.5 UsegetApplication(String, Loader)Returns the cached application with the given name, or null if the application isn't cached.
-
getApplication
com.atlassian.crowd.model.application.Application getApplication(String name, ApplicationCache.Loader loader) throws com.atlassian.crowd.exception.ApplicationNotFoundException
Returns the cached application with the given name, or null if the application isn't cached.- Throws:
com.atlassian.crowd.exception.ApplicationNotFoundException
-
putApplication
@Deprecated void putApplication(com.atlassian.crowd.model.application.Application application)
Deprecated.since 7.5 useremoveApplication(Application)andgetApplication(String, Loader)Caches the application against its name, as returned byApplication.getName().
-
removeApplication
void removeApplication(String name)
Removes the application with the given name from the cache. Does nothing if the name is not in the cache.
-
removeApplication
default void removeApplication(com.atlassian.crowd.model.application.Application application)
Removes the application with the given name from the cache. Does nothing if the name is not in the cache.- Since:
- 7.5
-
removeAll
void removeAll()
Removes all entries from the cache. Can be used when the cache is stale, but it's not possible to determine which applications should be removed.
-
-