public final class

DefaultApplicationCache

extends Object
implements ApplicationCache
java.lang.Object
   ↳ com.atlassian.confluence.user.crowd.DefaultApplicationCache

Class Overview

Implementation of 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.

Summary

Public Constructors
DefaultApplicationCache(CacheFactory cacheFactory, EventPublisher eventPublisher)
Public Methods
void directoryUpdated(DirectoryUpdatedEvent directoryUpdatedEvent)
Application getApplication(String name)
Returns the cached application with the given name, or null if the application isn't cached.
void putApplication(Application application)
Caches the application against its name, as returned by getName().
void removeAll()
Removes all entries from the cache.
void removeApplication(String name)
Removes the application with the given name from the cache.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.user.crowd.ApplicationCache

Public Constructors

public DefaultApplicationCache (CacheFactory cacheFactory, EventPublisher eventPublisher)

Public Methods

public void directoryUpdated (DirectoryUpdatedEvent directoryUpdatedEvent)

public Application getApplication (String name)

Returns the cached application with the given name, or null if the application isn't cached.

public void putApplication (Application application)

Caches the application against its name, as returned by getName().

public 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.

public void removeApplication (String name)

Removes the application with the given name from the cache. Does nothing if the name is not in the cache.