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 java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceDefinitionCache<DefinitionType>
definitionCache
protected org.camunda.commons.utils.cache.Cache<java.lang.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(java.lang.String definitionId)
protected abstract java.util.List<? extends ResourceDefinition>
getAllDefinitionsForDeployment(java.lang.String deploymentId)
org.camunda.commons.utils.cache.Cache<java.lang.String,InstanceType>
getCache()
protected InstanceType
loadAndCacheBpmnModelInstance(DefinitionType definitionEntity)
protected abstract void
logRemoveEntryFromDeploymentCacheFailure(java.lang.String definitionId, java.lang.Exception e)
protected abstract InstanceType
readModelFromStream(java.io.InputStream stream)
void
remove(java.lang.String definitionId)
void
removeAllDefinitionsByDeploymentId(java.lang.String deploymentId)
protected abstract void
throwLoadModelException(java.lang.String definitionId, java.lang.Exception e)
-
-
-
Field Detail
-
LOG
protected static final EnginePersistenceLogger LOG
-
instanceCache
protected org.camunda.commons.utils.cache.Cache<java.lang.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(java.lang.String definitionId)
-
loadAndCacheBpmnModelInstance
protected InstanceType loadAndCacheBpmnModelInstance(DefinitionType definitionEntity)
-
removeAllDefinitionsByDeploymentId
public void removeAllDefinitionsByDeploymentId(java.lang.String deploymentId)
-
remove
public void remove(java.lang.String definitionId)
-
clear
public void clear()
-
getCache
public org.camunda.commons.utils.cache.Cache<java.lang.String,InstanceType> getCache()
-
throwLoadModelException
protected abstract void throwLoadModelException(java.lang.String definitionId, java.lang.Exception e)
-
logRemoveEntryFromDeploymentCacheFailure
protected abstract void logRemoveEntryFromDeploymentCacheFailure(java.lang.String definitionId, java.lang.Exception e)
-
readModelFromStream
protected abstract InstanceType readModelFromStream(java.io.InputStream stream)
-
getAllDefinitionsForDeployment
protected abstract java.util.List<? extends ResourceDefinition> getAllDefinitionsForDeployment(java.lang.String deploymentId)
-
-