Class CacheAccessByKey
java.lang.Object
eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
eu.europa.esig.dss.tsl.cache.access.CacheAccessByKey
Accesses a cache records by the specified key
-
Field Summary
Fields inherited from class eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
downloadCache, key, parsingCache, validationCache -
Constructor Summary
ConstructorsConstructorDescriptionCacheAccessByKey(CacheKey key, DownloadCache downloadCache, ParsingCache parsingCache, ValidationCache validationCache) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the entry from downloadCache if its value is TO_BE_DELETEDvoidRemoves the entry from parsingCache if its value is TO_BE_DELETEDvoidRemoves the entry from parsingCache if its value is TO_BE_DELETEDvoidSets the download errorvoidSets the parsing record to the expired statevoidExpires the validation recordReturns the CacheKeybooleanChecks if the entry must be deleted from the file cache (download cache)booleanGets of the parsing refresh is neededbooleanisUpToDate(XmlDownloadResult xmlDownloadResult) Checks if the download result is up to date for the given keybooleanGets if the validation refresh is neededvoidSets the parsing errorvoidupdate(XmlDownloadResult result) Updates the download resultvoidupdate(AbstractParsingResult parsingResult) Updates the parsing resultvoidupdate(ValidationResult validationResult) Updates the validation recordvoidSets the validation errorMethods inherited from class eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
getDownloadReadOnlyResult, getParsingReadOnlyResult, getValidationReadOnlyResult
-
Constructor Details
-
CacheAccessByKey
public CacheAccessByKey(CacheKey key, DownloadCache downloadCache, ParsingCache parsingCache, ValidationCache validationCache) Default constructor- Parameters:
key-CacheKeyto usedownloadCache-DownloadCacheparsingCache-ParsingCachevalidationCache-ValidationCache
-
-
Method Details
-
getCacheKey
-
isUpToDate
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
Updates the download result- Parameters:
result-XmlDownloadResultto store
-
downloadError
-
isParsingRefreshNeeded
public boolean isParsingRefreshNeeded()Gets of the parsing refresh is needed- Returns:
- TRUE if the parsing refresh is needed, FALSE otherwise
-
update
Updates the parsing result- Parameters:
parsingResult-AbstractParsingResultto store
-
expireParsing
public void expireParsing()Sets the parsing record to the expired state -
parsingError
-
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
Updates the validation record- Parameters:
validationResult-ValidationResultto store
-
validationError
-
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
-