public abstract class ModelInstanceCache<InstanceType extends ModelInstance,DefinitionType extends ResourceDefinitionEntity> extends Object
Modifier and Type | Field and Description |
---|---|
protected ResourceDefinitionCache<DefinitionType> |
definitionCache |
protected org.camunda.commons.utils.cache.Cache<String,InstanceType> |
instanceCache |
protected static EnginePersistenceLogger |
LOG |
Constructor and Description |
---|
ModelInstanceCache(CacheFactory factory,
int cacheCapacity,
ResourceDefinitionCache<DefinitionType> definitionCache) |
Modifier and Type | Method and 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) |
protected static final EnginePersistenceLogger LOG
protected org.camunda.commons.utils.cache.Cache<String,InstanceType extends ModelInstance> instanceCache
protected ResourceDefinitionCache<DefinitionType extends ResourceDefinitionEntity> definitionCache
public ModelInstanceCache(CacheFactory factory, int cacheCapacity, ResourceDefinitionCache<DefinitionType> definitionCache)
public InstanceType findBpmnModelInstanceForDefinition(DefinitionType definitionEntity)
public InstanceType findBpmnModelInstanceForDefinition(String definitionId)
protected InstanceType loadAndCacheBpmnModelInstance(DefinitionType definitionEntity)
public void removeAllDefinitionsByDeploymentId(String deploymentId)
public void remove(String definitionId)
public void clear()
public org.camunda.commons.utils.cache.Cache<String,InstanceType> getCache()
protected abstract void throwLoadModelException(String definitionId, Exception e)
protected abstract void logRemoveEntryFromDeploymentCacheFailure(String definitionId, Exception e)
protected abstract InstanceType readModelFromStream(InputStream stream)
protected abstract List<? extends ResourceDefinition> getAllDefinitionsForDeployment(String deploymentId)
Copyright © 2018. All rights reserved.