Class ResourceDefinitionCache<T extends ResourceDefinitionEntity>
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.deploy.cache.ResourceDefinitionCache<T>
-
- Direct Known Subclasses:
CamundaFormDefinitionCache
,CaseDefinitionCache
,DecisionDefinitionCache
,DecisionRequirementsDefinitionCache
,ProcessDefinitionCache
public abstract class ResourceDefinitionCache<T extends ResourceDefinitionEntity> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.camunda.commons.utils.cache.Cache<java.lang.String,T>
cache
protected CacheDeployer
cacheDeployer
-
Constructor Summary
Constructors Constructor Description ResourceDefinitionCache(CacheFactory factory, int cacheCapacity, CacheDeployer cacheDeployer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addDefinition(T definition)
protected abstract void
checkDefinitionFound(java.lang.String definitionId, T definition)
protected abstract void
checkInvalidDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey, T definition)
protected abstract void
checkInvalidDefinitionByKey(java.lang.String definitionKey, T definition)
protected abstract void
checkInvalidDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId, T definition)
protected abstract void
checkInvalidDefinitionByKeyVersionAndTenantId(java.lang.String definitionKey, java.lang.Integer definitionVersion, java.lang.String tenantId, T definition)
protected abstract void
checkInvalidDefinitionByKeyVersionTagAndTenantId(java.lang.String definitionKey, java.lang.String definitionVersionTag, java.lang.String tenantId, T definition)
protected abstract void
checkInvalidDefinitionId(java.lang.String definitionId)
protected abstract void
checkInvalidDefinitionWasCached(java.lang.String deploymentId, java.lang.String definitionId, T definition)
void
clear()
T
findDefinitionFromCache(java.lang.String definitionId)
T
findDeployedDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey)
T
findDeployedDefinitionById(java.lang.String definitionId)
T
findDeployedDefinitionByKeyVersionAndTenantId(java.lang.String definitionKey, java.lang.Integer definitionVersion, java.lang.String tenantId)
T
findDeployedDefinitionByKeyVersionTagAndTenantId(java.lang.String definitionKey, java.lang.String definitionVersionTag, java.lang.String tenantId)
T
findDeployedLatestDefinitionByKey(java.lang.String definitionKey)
T
findDeployedLatestDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId)
org.camunda.commons.utils.cache.Cache<java.lang.String,T>
getCache()
T
getDefinition(java.lang.String id)
protected abstract AbstractResourceDefinitionManager<T>
getManager()
void
removeDefinitionFromCache(java.lang.String id)
T
resolveDefinition(T definition)
-
-
-
Field Detail
-
cache
protected org.camunda.commons.utils.cache.Cache<java.lang.String,T extends ResourceDefinitionEntity> cache
-
cacheDeployer
protected CacheDeployer cacheDeployer
-
-
Constructor Detail
-
ResourceDefinitionCache
public ResourceDefinitionCache(CacheFactory factory, int cacheCapacity, CacheDeployer cacheDeployer)
-
-
Method Detail
-
findDefinitionFromCache
public T findDefinitionFromCache(java.lang.String definitionId)
-
findDeployedDefinitionById
public T findDeployedDefinitionById(java.lang.String definitionId)
-
findDeployedLatestDefinitionByKey
public T findDeployedLatestDefinitionByKey(java.lang.String definitionKey)
- Returns:
- the latest version of the definition with the given key (from any tenant)
- Throws:
ProcessEngineException
- if more than one tenant has a definition with the given key
-
findDeployedLatestDefinitionByKeyAndTenantId
public T findDeployedLatestDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId)
-
findDeployedDefinitionByKeyVersionAndTenantId
public T findDeployedDefinitionByKeyVersionAndTenantId(java.lang.String definitionKey, java.lang.Integer definitionVersion, java.lang.String tenantId)
-
findDeployedDefinitionByKeyVersionTagAndTenantId
public T findDeployedDefinitionByKeyVersionTagAndTenantId(java.lang.String definitionKey, java.lang.String definitionVersionTag, java.lang.String tenantId)
-
findDeployedDefinitionByDeploymentAndKey
public T findDeployedDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey)
-
addDefinition
public void addDefinition(T definition)
-
getDefinition
public T getDefinition(java.lang.String id)
-
removeDefinitionFromCache
public void removeDefinitionFromCache(java.lang.String id)
-
clear
public void clear()
-
getCache
public org.camunda.commons.utils.cache.Cache<java.lang.String,T> getCache()
-
getManager
protected abstract AbstractResourceDefinitionManager<T> getManager()
-
checkInvalidDefinitionId
protected abstract void checkInvalidDefinitionId(java.lang.String definitionId)
-
checkDefinitionFound
protected abstract void checkDefinitionFound(java.lang.String definitionId, T definition)
-
checkInvalidDefinitionByKey
protected abstract void checkInvalidDefinitionByKey(java.lang.String definitionKey, T definition)
-
checkInvalidDefinitionByKeyAndTenantId
protected abstract void checkInvalidDefinitionByKeyAndTenantId(java.lang.String definitionKey, java.lang.String tenantId, T definition)
-
checkInvalidDefinitionByKeyVersionAndTenantId
protected abstract void checkInvalidDefinitionByKeyVersionAndTenantId(java.lang.String definitionKey, java.lang.Integer definitionVersion, java.lang.String tenantId, T definition)
-
checkInvalidDefinitionByKeyVersionTagAndTenantId
protected abstract void checkInvalidDefinitionByKeyVersionTagAndTenantId(java.lang.String definitionKey, java.lang.String definitionVersionTag, java.lang.String tenantId, T definition)
-
checkInvalidDefinitionByDeploymentAndKey
protected abstract void checkInvalidDefinitionByDeploymentAndKey(java.lang.String deploymentId, java.lang.String definitionKey, T definition)
-
checkInvalidDefinitionWasCached
protected abstract void checkInvalidDefinitionWasCached(java.lang.String deploymentId, java.lang.String definitionId, T definition)
-
-