Class LocallyCachedDirectoryEntityResolver
java.lang.Object
com.atlassian.crowd.dao.direntity.LocallyCachedDirectoryEntityResolver
- All Implemented Interfaces:
DirectoryEntityResolver
Implementation of
DirectoryEntityResolver
with local in-memory cache.-
Constructor Summary
ConstructorsConstructorDescriptionLocallyCachedDirectoryEntityResolver
(Duration cacheTtl, ScheduledExecutorService cleanupPool) -
Method Summary
Modifier and TypeMethodDescription<T extends DirectoryEntity>
voidput
(T entity) void
putAll
(List<? extends DirectoryEntity> entities) <T extends DirectoryEntity>
T<T extends DirectoryEntity>
List<T>resolveAllOrNothing
(long directoryId, Collection<String> names, Class<T> entityClass) Returns list of all entities for the given keys, or null if any of the corresponding entities can't be found.
-
Constructor Details
-
LocallyCachedDirectoryEntityResolver
public LocallyCachedDirectoryEntityResolver(Duration cacheTtl, ScheduledExecutorService cleanupPool)
-
-
Method Details
-
resolve
@Nullable public <T extends DirectoryEntity> T resolve(long directoryId, String name, Class<T> entityClass) - Specified by:
resolve
in interfaceDirectoryEntityResolver
-
put
- Specified by:
put
in interfaceDirectoryEntityResolver
-
resolveAllOrNothing
@Nullable public <T extends DirectoryEntity> List<T> resolveAllOrNothing(long directoryId, Collection<String> names, Class<T> entityClass) Description copied from interface:DirectoryEntityResolver
Returns list of all entities for the given keys, or null if any of the corresponding entities can't be found.- Specified by:
resolveAllOrNothing
in interfaceDirectoryEntityResolver
-
putAll
- Specified by:
putAll
in interfaceDirectoryEntityResolver
-