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()
int
getSize()
int
internalGet
(K key) protected void
internalInit
(boolean forceReinit) Internal initialization of the object.protected void
internalRemove
(K key) protected void
internalSet
(K key, O value) void
setSize
(int size) void
setTimeout
(int timeout) void
setTimeUnit
(TimeUnit timeUnit) toString()
Methods inherited from class org.pac4j.core.store.AbstractStore
get, remove, set
Methods 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:InitializableObject
Internal initialization of the object.- Overrides:
internalInit
in classAbstractStore<K,
O>
-
internalGet
- Specified by:
internalGet
in classAbstractStore<K,
O>
-
internalSet
- Specified by:
internalSet
in classAbstractStore<K,
O>
-
internalRemove
- Specified by:
internalRemove
in 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
-