Class CacheAccessByKey

java.lang.Object
eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
eu.europa.esig.dss.tsl.cache.access.CacheAccessByKey

public class CacheAccessByKey extends ReadOnlyCacheAccessByKey
Accesses a cache records by the specified key
  • Constructor Details

  • Method Details

    • getCacheKey

      public CacheKey getCacheKey()
      Returns the CacheKey
      Returns:
      CacheKey
    • isUpToDate

      public boolean isUpToDate(XmlDownloadResult xmlDownloadResult)
      Checks if the download result is up to date for the given key
      Parameters:
      xmlDownloadResult - XmlDownloadResult
      Returns:
      TRUE if the download result matches, FALSE otherwise
    • update

      public void update(XmlDownloadResult result)
      Updates the download result
      Parameters:
      result - XmlDownloadResult to store
    • downloadError

      public void downloadError(Exception e)
      Sets the download error
      Parameters:
      e - Exception
    • isParsingRefreshNeeded

      public boolean isParsingRefreshNeeded()
      Gets of the parsing refresh is needed
      Returns:
      TRUE if the parsing refresh is needed, FALSE otherwise
    • update

      public void update(AbstractParsingResult parsingResult)
      Updates the parsing result
      Parameters:
      parsingResult - AbstractParsingResult to store
    • expireParsing

      public void expireParsing()
      Sets the parsing record to the expired state
    • parsingError

      public void parsingError(Exception e)
      Sets the parsing error
      Parameters:
      e - Exception
    • isValidationRefreshNeeded

      public boolean isValidationRefreshNeeded()
      Gets if the validation refresh is needed
      Returns:
      TRUE if the validation refresh is needed, FALSE otherwise
    • expireValidation

      public void expireValidation()
      Expires the validation record
    • update

      public void update(ValidationResult validationResult)
      Updates the validation record
      Parameters:
      validationResult - ValidationResult to store
    • validationError

      public void validationError(Exception e)
      Sets the validation error
      Parameters:
      e - Exception
    • isFileNeedToBeDeleted

      public boolean isFileNeedToBeDeleted()
      Checks if the entry must be deleted from the file cache (download cache)
      Returns:
      TRUE if the entry need to be deleted, FALSE otherwise
    • deleteDownloadCacheIfNeeded

      public void deleteDownloadCacheIfNeeded()
      Removes the entry from downloadCache if its value is TO_BE_DELETED
    • deleteParsingCacheIfNeeded

      public void deleteParsingCacheIfNeeded()
      Removes the entry from parsingCache if its value is TO_BE_DELETED
    • deleteValidationCacheIfNeeded

      public void deleteValidationCacheIfNeeded()
      Removes the entry from parsingCache if its value is TO_BE_DELETED