Enum Class CacheStateEnum
- All Implemented Interfaces:
CacheState
,Serializable
,Comparable<CacheStateEnum>
,Constable
Contains states for a cache record
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe cache content is not synchronized with the applicationThe data cannot be downloaded / parsed / validatedNothing / Expired content is stored in the cacheThe application and the cache content are synchronizedThe cache content needs to be deleted -
Method Summary
Modifier and TypeMethodDescriptionvoid
desync
(CacheContext cacheContext) The cache entry is marked as Desynchronizedvoid
error
(CacheContext cacheContext, CachedExceptionWrapper exception) The cache entry is marked in error state with the related exceptionvoid
refreshNeeded
(CacheContext cacheContext) The cache entry needs to be refreshedvoid
sync
(CacheContext cacheContext) The cache entry is marked as Synchronizedvoid
toBeDeleted
(CacheContext cacheContext) The cache entry is marked as to be deletedstatic CacheStateEnum
Returns the enum constant of this class with the specified name.static CacheStateEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REFRESH_NEEDED
Nothing / Expired content is stored in the cache -
DESYNCHRONIZED
The cache content is not synchronized with the application -
SYNCHRONIZED
The application and the cache content are synchronized -
ERROR
The data cannot be downloaded / parsed / validated -
TO_BE_DELETED
The cache content needs to be deleted
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
sync
Description copied from interface:CacheState
The cache entry is marked as Synchronized- Specified by:
sync
in interfaceCacheState
- Parameters:
cacheContext
- the current cache context
-
desync
Description copied from interface:CacheState
The cache entry is marked as Desynchronized- Specified by:
desync
in interfaceCacheState
- Parameters:
cacheContext
- the current cache context
-
refreshNeeded
Description copied from interface:CacheState
The cache entry needs to be refreshed- Specified by:
refreshNeeded
in interfaceCacheState
- Parameters:
cacheContext
- the current cache context
-
toBeDeleted
Description copied from interface:CacheState
The cache entry is marked as to be deleted- Specified by:
toBeDeleted
in interfaceCacheState
- Parameters:
cacheContext
- the current cache context
-
error
Description copied from interface:CacheState
The cache entry is marked in error state with the related exception- Specified by:
error
in interfaceCacheState
- Parameters:
cacheContext
- the current cache contextexception
- the wrapped met exception
-