Enum CacheStateEnum
- All Implemented Interfaces:
CacheState
,Serializable
,Comparable<CacheStateEnum>
public enum CacheStateEnum extends Enum<CacheStateEnum> implements CacheState
Contains states for a cache record
-
Enum Constant Summary
Enum Constants Enum Constant Description DESYNCHRONIZED
The cache content is not synchronized with the applicationERROR
The data cannot be downloaded / parsed / validatedREFRESH_NEEDED
Nothing / Expired content is stored in the cacheSYNCHRONIZED
The application and the cache content are synchronizedTO_BE_DELETED
The cache content needs to be deleted -
Method Summary
Modifier and Type Method Description void
desync(CacheContext cacheContext)
The cache entry is marked as Desynchronizedvoid
error(CacheContext cacheContext, CachedException 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
valueOf(String name)
Returns the enum constant of this type with the specified name.static CacheStateEnum[]
values()
Returns an array containing the constants of this enum type, 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
-