Class EntityCacheImpl
java.lang.Object
org.flowable.common.engine.impl.persistence.cache.EntityCacheImpl
- All Implemented Interfaces:
Session,EntityCache
- Author:
- Joram Barrez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheRemove(Class<?> entityClass, String entityId) Removes theEntityof the given type with the given id from the cache.voidclose()protected Map<String,CachedEntity> findClassCacheByCheckingSubclasses(Class<?> entityClass) <T> List<T>findInCache(Class<T> entityClass) Returns all cachedEntityinstances of a given type.<T> TfindInCache(Class<T> entityClass, String id) Returns the cachedEntityinstance of the given class with the provided id.<T> Collection<CachedEntity>findInCacheAsCachedObjects(Class<T> entityClass) Returns allCachedEntityinstances for the given type.voidflush()Map<Class<?>,Map<String, CachedEntity>> Returns all cachedEntityinstances as a map with following structure: { entityClassName, {entityId, entity} }Adds the givesEntityto the cache.
-
Field Details
-
cachedObjects
-
-
Constructor Details
-
EntityCacheImpl
public EntityCacheImpl()
-
-
Method Details
-
put
Description copied from interface:EntityCacheAdds the givesEntityto the cache.- Specified by:
putin interfaceEntityCache- Parameters:
entity- TheEntityinstancestoreState- If true, the current stateEntity.getPersistentState()will be stored for future diffing. Note that, if false, theEntitywill always be seen as changed.- Returns:
- Returns a
CachedEntityinstance, which can be enriched later on.
-
findInCache
Description copied from interface:EntityCacheReturns the cachedEntityinstance of the given class with the provided id. Returns null if such aEntitycannot be found.- Specified by:
findInCachein interfaceEntityCache
-
findClassCacheByCheckingSubclasses
-
cacheRemove
Description copied from interface:EntityCacheRemoves theEntityof the given type with the given id from the cache.- Specified by:
cacheRemovein interfaceEntityCache
-
findInCacheAsCachedObjects
Description copied from interface:EntityCacheReturns allCachedEntityinstances for the given type. The difference withEntityCache.findInCache(Class)is that here the wholeCachedEntityis returned, which gives access to the persistent state at the moment of putting it in the cache.- Specified by:
findInCacheAsCachedObjectsin interfaceEntityCache
-
findInCache
Description copied from interface:EntityCacheReturns all cachedEntityinstances of a given type. Returns an empty list if no instances of the given type exist.- Specified by:
findInCachein interfaceEntityCache
-
getAllCachedEntities
Description copied from interface:EntityCacheReturns all cachedEntityinstances as a map with following structure: { entityClassName, {entityId, entity} }- Specified by:
getAllCachedEntitiesin interfaceEntityCache
-
close
public void close() -
flush
public void flush()
-