Package org.pac4j.core.store
Class AbstractStore<K,O>
java.lang.Object
org.pac4j.core.util.InitializableObject
org.pac4j.core.store.AbstractStore<K,O>
- All Implemented Interfaces:
Store<K,
O>
- Direct Known Subclasses:
GuavaStore
Abstract store.
- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a value by key.internalGet
(K key) internalGet.protected void
internalInit
(boolean forceReinit) Internal initialization of the object.protected abstract void
internalRemove
(K key) internalRemove.protected abstract void
internalSet
(K key, O value) internalSet.void
Remove the value associated to the key.void
Set a value by its key.Methods inherited from class org.pac4j.core.util.InitializableObject
afterInternalInit, beforeInternalInit, getNbAttempts, init, init, isInitialized, reinit, shouldInitialize
-
Constructor Details
-
AbstractStore
public AbstractStore()
-
-
Method Details
-
internalInit
protected void internalInit(boolean forceReinit) Internal initialization of the object.- Specified by:
internalInit
in classInitializableObject
- Parameters:
forceReinit
- a boolean
-
get
Get a value by key. -
set
Set a value by its key. -
remove
Remove the value associated to the key. -
internalGet
internalGet.
- Parameters:
key
- a K object- Returns:
- a
Optional
object
-
internalSet
internalSet.
- Parameters:
key
- a K objectvalue
- a O object
-
internalRemove
internalRemove.
- Parameters:
key
- a K object
-