Class ProcessDefinitionInfoCache
- java.lang.Object
-
- org.flowable.engine.impl.persistence.deploy.ProcessDefinitionInfoCache
-
- All Implemented Interfaces:
DeploymentCache<ProcessDefinitionInfoCacheObject>
public class ProcessDefinitionInfoCache extends Object implements DeploymentCache<ProcessDefinitionInfoCacheObject>
Default cache: keep everything in memory, unless a limit is set.- Author:
- Tijs Rademakers
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ProcessDefinitionInfoCacheObject>cacheprotected CommandExecutorcommandExecutor
-
Constructor Summary
Constructors Constructor Description ProcessDefinitionInfoCache(CommandExecutor commandExecutor)Cache with no limitProcessDefinitionInfoCache(CommandExecutor commandExecutor, int limit)Cache which has a hard limit: no more elements will be cached than the limit.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String id, ProcessDefinitionInfoCacheObject obj)voidclear()booleancontains(String id)ProcessDefinitionInfoCacheObjectget(String processDefinitionId)Collection<ProcessDefinitionInfoCacheObject>getAll()voidremove(String id)protected ProcessDefinitionInfoCacheObjectretrieveProcessDefinitionInfoCacheObject(String processDefinitionId, CommandContext commandContext)intsize()
-
-
-
Field Detail
-
cache
protected Map<String,ProcessDefinitionInfoCacheObject> cache
-
commandExecutor
protected CommandExecutor commandExecutor
-
-
Constructor Detail
-
ProcessDefinitionInfoCache
public ProcessDefinitionInfoCache(CommandExecutor commandExecutor)
Cache with no limit
-
ProcessDefinitionInfoCache
public ProcessDefinitionInfoCache(CommandExecutor commandExecutor, int limit)
Cache which has a hard limit: no more elements will be cached than the limit.
-
-
Method Detail
-
get
public ProcessDefinitionInfoCacheObject get(String processDefinitionId)
- Specified by:
getin interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
contains
public boolean contains(String id)
- Specified by:
containsin interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
add
public void add(String id, ProcessDefinitionInfoCacheObject obj)
- Specified by:
addin interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
remove
public void remove(String id)
- Specified by:
removein interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
clear
public void clear()
- Specified by:
clearin interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
getAll
public Collection<ProcessDefinitionInfoCacheObject> getAll()
- Specified by:
getAllin interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
size
public int size()
- Specified by:
sizein interfaceDeploymentCache<ProcessDefinitionInfoCacheObject>
-
retrieveProcessDefinitionInfoCacheObject
protected ProcessDefinitionInfoCacheObject retrieveProcessDefinitionInfoCacheObject(String processDefinitionId, CommandContext commandContext)
-
-