public abstract class ResourceDefinitionCache<T extends ResourceDefinitionEntity> extends Object
Modifier and Type | Field and Description |
---|---|
protected org.camunda.commons.utils.cache.Cache<String,T> |
cache |
protected CacheDeployer |
cacheDeployer |
Constructor and Description |
---|
ResourceDefinitionCache(CacheFactory factory,
int cacheCapacity,
CacheDeployer cacheDeployer) |
Modifier and Type | Method and 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) |
protected org.camunda.commons.utils.cache.Cache<String,T extends ResourceDefinitionEntity> cache
protected CacheDeployer cacheDeployer
public ResourceDefinitionCache(CacheFactory factory, int cacheCapacity, CacheDeployer cacheDeployer)
public T findDeployedLatestDefinitionByKey(String definitionKey)
ProcessEngineException
- if more than one tenant has a definition with the given keypublic T findDeployedLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId)
public T findDeployedDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId)
public T findDeployedDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId)
public T findDeployedDefinitionByDeploymentAndKey(String deploymentId, String definitionKey)
public void addDefinition(T definition)
public void removeDefinitionFromCache(String id)
public void clear()
protected abstract AbstractResourceDefinitionManager<T> getManager()
protected abstract void checkInvalidDefinitionId(String definitionId)
protected abstract void checkDefinitionFound(String definitionId, 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 checkInvalidDefinitionByDeploymentAndKey(String deploymentId, String definitionKey, T definition)
Copyright © 2021. All rights reserved.