Package org.keycloak.storage
Class CacheableStorageProviderModel
- java.lang.Object
-
- org.keycloak.component.ComponentModel
-
- org.keycloak.component.PrioritizedComponentModel
-
- org.keycloak.storage.CacheableStorageProviderModel
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientScopeStorageProviderModel,ClientStorageProviderModel,GroupStorageProviderModel,RoleStorageProviderModel,UserStorageProviderModel
public class CacheableStorageProviderModel extends PrioritizedComponentModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheableStorageProviderModel.CachePolicy
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_INVALID_BEFOREstatic StringCACHE_POLICYstatic StringENABLEDstatic StringEVICTION_DAYstatic StringEVICTION_HOURstatic StringEVICTION_MINUTEstatic StringMAX_LIFESPAN-
Fields inherited from class org.keycloak.component.PrioritizedComponentModel
comparator, PRIORITY
-
-
Constructor Summary
Constructors Constructor Description CacheableStorageProviderModel()CacheableStorageProviderModel(ComponentModel copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longdailyEvictionBoundary(int hour, int minute)static longdailyTimeout(int hour, int minute)longgetCacheInvalidBefore()CacheableStorageProviderModel.CachePolicygetCachePolicy()intgetEvictionDay()intgetEvictionHour()intgetEvictionMinute()longgetLifespan()longgetMaxLifespan()booleanisEnabled()voidsetCacheInvalidBefore(long cacheInvalidBefore)voidsetCachePolicy(CacheableStorageProviderModel.CachePolicy cachePolicy)voidsetEnabled(boolean flag)voidsetEvictionDay(int evictionDay)voidsetEvictionHour(int evictionHour)voidsetEvictionMinute(int evictionMinute)voidsetMaxLifespan(long maxLifespan)booleanshouldInvalidate(CachedObject cached)static longweeklyTimeout(int day, int hour, int minute)-
Methods inherited from class org.keycloak.component.PrioritizedComponentModel
getPriority, parsePriority, setPriority
-
Methods inherited from class org.keycloak.component.ComponentModel
contains, get, get, get, get, get, getConfig, getId, getName, getNote, getParentId, getProviderId, getProviderType, getSubType, hasNote, put, put, put, put, removeNote, setConfig, setId, setName, setNote, setParentId, setProviderId, setProviderType, setSubType
-
-
-
-
Field Detail
-
CACHE_POLICY
public static final String CACHE_POLICY
- See Also:
- Constant Field Values
-
MAX_LIFESPAN
public static final String MAX_LIFESPAN
- See Also:
- Constant Field Values
-
EVICTION_HOUR
public static final String EVICTION_HOUR
- See Also:
- Constant Field Values
-
EVICTION_MINUTE
public static final String EVICTION_MINUTE
- See Also:
- Constant Field Values
-
EVICTION_DAY
public static final String EVICTION_DAY
- See Also:
- Constant Field Values
-
CACHE_INVALID_BEFORE
public static final String CACHE_INVALID_BEFORE
- See Also:
- Constant Field Values
-
ENABLED
public static final String ENABLED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CacheableStorageProviderModel
public CacheableStorageProviderModel()
-
CacheableStorageProviderModel
public CacheableStorageProviderModel(ComponentModel copy)
-
-
Method Detail
-
getCachePolicy
public CacheableStorageProviderModel.CachePolicy getCachePolicy()
-
setCachePolicy
public void setCachePolicy(CacheableStorageProviderModel.CachePolicy cachePolicy)
-
getMaxLifespan
public long getMaxLifespan()
-
setMaxLifespan
public void setMaxLifespan(long maxLifespan)
-
getEvictionHour
public int getEvictionHour()
-
setEvictionHour
public void setEvictionHour(int evictionHour)
-
getEvictionMinute
public int getEvictionMinute()
-
setEvictionMinute
public void setEvictionMinute(int evictionMinute)
-
getEvictionDay
public int getEvictionDay()
-
setEvictionDay
public void setEvictionDay(int evictionDay)
-
getCacheInvalidBefore
public long getCacheInvalidBefore()
-
setCacheInvalidBefore
public void setCacheInvalidBefore(long cacheInvalidBefore)
-
setEnabled
public void setEnabled(boolean flag)
-
isEnabled
public boolean isEnabled()
-
getLifespan
public long getLifespan()
-
shouldInvalidate
public boolean shouldInvalidate(CachedObject cached)
-
dailyTimeout
public static long dailyTimeout(int hour, int minute)
-
dailyEvictionBoundary
public static long dailyEvictionBoundary(int hour, int minute)
-
weeklyTimeout
public static long weeklyTimeout(int day, int hour, int minute)
-
-