Package org.pac4j.core.store
Class GuavaStore<K,O>
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.store.AbstractStore<K,O>
org.pac4j.core.store.GuavaStore<K,O>
- All Implemented Interfaces:
Store<K,O>
Store data in a Guava cache.
Add the
guava dependency to use this store.- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCache()intgetSize()intinternalGet(K key) protected voidinternalInit(boolean forceReinit) Internal initialization of the object.protected voidinternalRemove(K key) protected voidinternalSet(K key, O value) voidsetSize(int size) voidsetTimeout(int timeout) voidsetTimeUnit(TimeUnit timeUnit) toString()Methods inherited from class org.pac4j.core.store.AbstractStore
get, remove, setMethods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getLastAttempt, getMaxAttempts, getMinTimeIntervalBetweenAttemptsInMilliseconds, getNbAttempts, init, init, isInitialized, reinit, setMaxAttempts, setMinTimeIntervalBetweenAttemptsInMilliseconds, shouldInitialize
-
Constructor Details
-
GuavaStore
public GuavaStore() -
GuavaStore
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) Description copied from class:InitializableObjectInternal initialization of the object.- Overrides:
internalInitin classAbstractStore<K,O>
-
internalGet
- Specified by:
internalGetin classAbstractStore<K,O>
-
internalSet
- Specified by:
internalSetin classAbstractStore<K,O>
-
internalRemove
- Specified by:
internalRemovein classAbstractStore<K,O>
-
getCache
-
getSize
public int getSize() -
setSize
public void setSize(int size) -
getTimeout
public int getTimeout() -
setTimeout
public void setTimeout(int timeout) -
getTimeUnit
-
setTimeUnit
-
toString
-