Class CachedEntry<R extends CachedResult>
java.lang.Object
eu.europa.esig.dss.tsl.cache.state.CachedEntry<R>
- Type Parameters:
R
- type of the entry
Defines a cached entry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
error
(CachedExceptionWrapper exception) Sets the errorvoid
expire()
Expires the cache entryGets the cached resultGets the state of the cacheGets the first time when the exception occurredGets the last time when the exception occurredGets the exception message for an error statusGets the exception stack trace for an error statusGets last status change timeGets last synchronization timeboolean
isDesync()
Checks if the status 'desynchronized' is set for the cache entryboolean
isEmpty()
Checks if the cache record is emptyboolean
isError()
Checks if the current status of the cache is errorboolean
Checks if the refresh is needed for the cache entryboolean
Checks if the status 'toBeDeleted' is set for the cache entryvoid
sync()
Synchronizes the cache entryvoid
Synchronizes the update datevoid
Sets 'toBeDeleted' status for the cache entryvoid
Updates the cache record
-
Constructor Details
-
CachedEntry
public CachedEntry()Empty constructor -
CachedEntry
-
-
Method Details
-
getCurrentState
-
getLastStateTransitionTime
-
getLastSuccessSynchronizationTime
-
getCachedResult
-
update
Updates the cache record- Parameters:
newCachedResult
- new cache record
-
syncUpdateDate
public void syncUpdateDate()Synchronizes the update date -
error
Sets the error- Parameters:
exception
-CachedExceptionWrapper
-
expire
public void expire()Expires the cache entry -
sync
public void sync()Synchronizes the cache entry -
toBeDeleted
public void toBeDeleted()Sets 'toBeDeleted' status for the cache entry -
isToBeDeleted
public boolean isToBeDeleted()Checks if the status 'toBeDeleted' is set for the cache entry- Returns:
- TRUE if the status is 'toBeDeleted', FALSE otherwise
-
isDesync
public boolean isDesync()Checks if the status 'desynchronized' is set for the cache entry- Returns:
- TRUE if the status is 'desynchronized', FALSE otherwise
-
isRefreshNeeded
public boolean isRefreshNeeded()Checks if the refresh is needed for the cache entry- Returns:
- TRUE if refresh is needed', FALSE otherwise
-
isEmpty
public boolean isEmpty()Checks if the cache record is empty- Returns:
- TRUE if the cache record is empty, FALSE otherwise
-
isError
public boolean isError()Checks if the current status of the cache is error- Returns:
- TRUE if the status is error, FALSE otherwise
-
getExceptionMessage
-
getExceptionStackTrace
-
getExceptionFirstOccurrenceTime
-
getExceptionLastOccurrenceTime
-