Class ResourceDefinitionCache<T extends ResourceDefinitionEntity>

    • 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)
      • resolveDefinition

        public T resolveDefinition​(T definition)
      • 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()
      • 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)