Class ModelInstanceCache<InstanceType extends ModelInstance,DefinitionType extends ResourceDefinitionEntity>
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.deploy.cache.ModelInstanceCache<InstanceType,DefinitionType>
-
- Direct Known Subclasses:
BpmnModelInstanceCache
,CmmnModelInstanceCache
,DmnModelInstanceCache
public abstract class ModelInstanceCache<InstanceType extends ModelInstance,DefinitionType extends ResourceDefinitionEntity> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceDefinitionCache<DefinitionType>
definitionCache
protected org.camunda.commons.utils.cache.Cache<String,InstanceType>
instanceCache
protected static EnginePersistenceLogger
LOG
-
Constructor Summary
Constructors Constructor Description ModelInstanceCache(CacheFactory factory, int cacheCapacity, ResourceDefinitionCache<DefinitionType> definitionCache)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
InstanceType
findBpmnModelInstanceForDefinition(DefinitionType definitionEntity)
InstanceType
findBpmnModelInstanceForDefinition(String definitionId)
protected abstract List<? extends ResourceDefinition>
getAllDefinitionsForDeployment(String deploymentId)
org.camunda.commons.utils.cache.Cache<String,InstanceType>
getCache()
protected InstanceType
loadAndCacheBpmnModelInstance(DefinitionType definitionEntity)
protected abstract void
logRemoveEntryFromDeploymentCacheFailure(String definitionId, Exception e)
protected abstract InstanceType
readModelFromStream(InputStream stream)
void
remove(String definitionId)
void
removeAllDefinitionsByDeploymentId(String deploymentId)
protected abstract void
throwLoadModelException(String definitionId, Exception e)
-
-
-
Field Detail
-
LOG
protected static final EnginePersistenceLogger LOG
-
instanceCache
protected org.camunda.commons.utils.cache.Cache<String,InstanceType extends ModelInstance> instanceCache
-
definitionCache
protected ResourceDefinitionCache<DefinitionType extends ResourceDefinitionEntity> definitionCache
-
-
Constructor Detail
-
ModelInstanceCache
public ModelInstanceCache(CacheFactory factory, int cacheCapacity, ResourceDefinitionCache<DefinitionType> definitionCache)
-
-
Method Detail
-
findBpmnModelInstanceForDefinition
public InstanceType findBpmnModelInstanceForDefinition(DefinitionType definitionEntity)
-
findBpmnModelInstanceForDefinition
public InstanceType findBpmnModelInstanceForDefinition(String definitionId)
-
loadAndCacheBpmnModelInstance
protected InstanceType loadAndCacheBpmnModelInstance(DefinitionType definitionEntity)
-
removeAllDefinitionsByDeploymentId
public void removeAllDefinitionsByDeploymentId(String deploymentId)
-
remove
public void remove(String definitionId)
-
clear
public void clear()
-
getCache
public org.camunda.commons.utils.cache.Cache<String,InstanceType> getCache()
-
throwLoadModelException
protected abstract void throwLoadModelException(String definitionId, Exception e)
-
logRemoveEntryFromDeploymentCacheFailure
protected abstract void logRemoveEntryFromDeploymentCacheFailure(String definitionId, Exception e)
-
readModelFromStream
protected abstract InstanceType readModelFromStream(InputStream stream)
-
getAllDefinitionsForDeployment
protected abstract List<? extends ResourceDefinition> getAllDefinitionsForDeployment(String deploymentId)
-
-