Package org.nuxeo.ecm.directory
Class DirectoryCache
- java.lang.Object
-
- org.nuxeo.ecm.directory.DirectoryCache
-
public class DirectoryCache extends Object
Very simple cache system to cache directory entry lookups (not search queries) on top of nuxeo cacheBeware that this cache is not transaction aware (which is not a problem for LDAP directories anyway).
-
-
Field Summary
Fields Modifier and Type Field Description protected Cache
entryCache
protected String
entryCacheName
protected Cache
entryCacheWithoutReferences
protected String
entryCacheWithoutReferencesName
protected io.dropwizard.metrics5.Counter
hitsCounter
protected io.dropwizard.metrics5.Counter
invalidationsCounter
protected io.dropwizard.metrics5.Counter
missesCounter
protected String
name
protected boolean
negativeCaching
protected io.dropwizard.metrics5.Counter
negativeHitsCounter
protected io.dropwizard.metrics5.MetricRegistry
registry
protected io.dropwizard.metrics5.Counter
sizeCounter
-
Constructor Summary
Constructors Modifier Constructor Description protected
DirectoryCache(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CacheService
getCacheService()
DocumentModel
getEntry(String entryId, EntrySource source)
DocumentModel
getEntry(String entryId, EntrySource source, boolean fetchReferences)
Cache
getEntryCache()
Cache
getEntryCacheWithoutReferences()
void
invalidate(String... entryIds)
void
invalidate(List<String> entryIds)
void
invalidateAll()
protected boolean
isCacheEnabled()
void
setEntryCacheName(String entryCacheName)
void
setEntryCacheWithoutReferencesName(String entryCacheWithoutReferencesName)
void
setNegativeCaching(Boolean negativeCaching)
-
-
-
Field Detail
-
entryCache
protected Cache entryCache
-
entryCacheName
protected String entryCacheName
-
entryCacheWithoutReferences
protected Cache entryCacheWithoutReferences
-
entryCacheWithoutReferencesName
protected String entryCacheWithoutReferencesName
-
negativeCaching
protected boolean negativeCaching
-
registry
protected final io.dropwizard.metrics5.MetricRegistry registry
-
hitsCounter
protected final io.dropwizard.metrics5.Counter hitsCounter
-
negativeHitsCounter
protected final io.dropwizard.metrics5.Counter negativeHitsCounter
-
missesCounter
protected final io.dropwizard.metrics5.Counter missesCounter
-
invalidationsCounter
protected final io.dropwizard.metrics5.Counter invalidationsCounter
-
sizeCounter
protected final io.dropwizard.metrics5.Counter sizeCounter
-
-
Constructor Detail
-
DirectoryCache
protected DirectoryCache(String name)
-
-
Method Detail
-
isCacheEnabled
protected boolean isCacheEnabled()
-
getEntry
public DocumentModel getEntry(String entryId, EntrySource source)
-
getEntry
public DocumentModel getEntry(String entryId, EntrySource source, boolean fetchReferences)
-
invalidate
public void invalidate(List<String> entryIds)
-
invalidate
public void invalidate(String... entryIds)
-
invalidateAll
public void invalidateAll()
-
setEntryCacheName
public void setEntryCacheName(String entryCacheName)
-
setEntryCacheWithoutReferencesName
public void setEntryCacheWithoutReferencesName(String entryCacheWithoutReferencesName)
-
setNegativeCaching
public void setNegativeCaching(Boolean negativeCaching)
-
getEntryCache
public Cache getEntryCache()
-
getEntryCacheWithoutReferences
public Cache getEntryCacheWithoutReferences()
-
getCacheService
protected CacheService getCacheService()
-
-