public class LocallyCachedDirectoryEntityResolver extends Object implements DirectoryEntityResolver
DirectoryEntityResolver
with local in-memory cache.Constructor and Description |
---|
LocallyCachedDirectoryEntityResolver(Duration cacheTtl,
ScheduledExecutorService cleanupPool) |
Modifier and Type | Method and Description |
---|---|
<T extends DirectoryEntity> |
put(T entity) |
void |
putAll(List<? extends DirectoryEntity> entities) |
<T extends DirectoryEntity> |
resolve(long directoryId,
String name,
Class<T> entityClass) |
<T extends DirectoryEntity> |
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.
|
public LocallyCachedDirectoryEntityResolver(Duration cacheTtl, ScheduledExecutorService cleanupPool)
@Nullable public <T extends DirectoryEntity> T resolve(long directoryId, String name, Class<T> entityClass)
resolve
in interface DirectoryEntityResolver
public <T extends DirectoryEntity> void put(T entity)
put
in interface DirectoryEntityResolver
@Nullable public <T extends DirectoryEntity> List<T> resolveAllOrNothing(long directoryId, Collection<String> names, Class<T> entityClass)
DirectoryEntityResolver
resolveAllOrNothing
in interface DirectoryEntityResolver
public void putAll(List<? extends DirectoryEntity> entities)
putAll
in interface DirectoryEntityResolver
Copyright © 2021 Atlassian. All rights reserved.