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 Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.camunda.commons.utils.cache.Cache<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(String definitionId, T definition)
protected abstract void
checkInvalidDefinitionByDeploymentAndKey(String deploymentId, String definitionKey, T definition)
protected abstract void
checkInvalidDefinitionByKey(String definitionKey, T definition)
protected abstract void
checkInvalidDefinitionByKeyAndTenantId(String definitionKey, String tenantId, T definition)
protected abstract void
checkInvalidDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId, T definition)
protected abstract void
checkInvalidDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId, T definition)
protected abstract void
checkInvalidDefinitionId(String definitionId)
protected abstract void
checkInvalidDefinitionWasCached(String deploymentId, String definitionId, T definition)
void
clear()
T
findDefinitionFromCache(String definitionId)
T
findDeployedDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
T
findDeployedDefinitionById(String definitionId)
T
findDeployedDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId)
T
findDeployedDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId)
T
findDeployedLatestDefinitionByKey(String definitionKey)
T
findDeployedLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId)
org.camunda.commons.utils.cache.Cache<String,T>
getCache()
T
getDefinition(String id)
protected abstract AbstractResourceDefinitionManager<T>
getManager()
void
removeDefinitionFromCache(String id)
T
resolveDefinition(T definition)
-
-
-
Field Detail
-
cache
protected org.camunda.commons.utils.cache.Cache<String,T extends ResourceDefinitionEntity> cache
-
cacheDeployer
protected CacheDeployer cacheDeployer
-
-
Constructor Detail
-
ResourceDefinitionCache
public ResourceDefinitionCache(CacheFactory factory, int cacheCapacity, CacheDeployer cacheDeployer)
-
-
Method Detail
-
findDeployedLatestDefinitionByKey
public T findDeployedLatestDefinitionByKey(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(String definitionKey, String tenantId)
-
findDeployedDefinitionByKeyVersionAndTenantId
public T findDeployedDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId)
-
findDeployedDefinitionByKeyVersionTagAndTenantId
public T findDeployedDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId)
-
findDeployedDefinitionByDeploymentAndKey
public T findDeployedDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
-
addDefinition
public void addDefinition(T definition)
-
removeDefinitionFromCache
public void removeDefinitionFromCache(String id)
-
clear
public void clear()
-
getManager
protected abstract AbstractResourceDefinitionManager<T> getManager()
-
checkInvalidDefinitionId
protected abstract void checkInvalidDefinitionId(String definitionId)
-
checkDefinitionFound
protected abstract void checkDefinitionFound(String definitionId, T definition)
-
checkInvalidDefinitionByKey
protected abstract void checkInvalidDefinitionByKey(String definitionKey, T definition)
-
checkInvalidDefinitionByKeyAndTenantId
protected abstract void checkInvalidDefinitionByKeyAndTenantId(String definitionKey, String tenantId, T definition)
-
checkInvalidDefinitionByKeyVersionAndTenantId
protected abstract void checkInvalidDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId, T definition)
-
checkInvalidDefinitionByKeyVersionTagAndTenantId
protected abstract void checkInvalidDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId, T definition)
-
checkInvalidDefinitionByDeploymentAndKey
protected abstract void checkInvalidDefinitionByDeploymentAndKey(String deploymentId, String definitionKey, T definition)
-
-