Package org.opensaml.storage.impl
Class MemoryStorageService
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- org.opensaml.storage.AbstractStorageService
-
- org.opensaml.storage.AbstractMapBackedStorageService
-
- org.opensaml.storage.impl.MemoryStorageService
-
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,StorageCapabilities,StorageCapabilitiesEx,StorageService
public class MemoryStorageService extends AbstractMapBackedStorageService implements StorageCapabilitiesEx
Implementation ofAbstractMapBackedStorageServicethat stores data in-memory in a shared data structure with no persistence.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Map<String,MutableStorageRecord<?>>>contextMapMap of contexts.private ReadWriteLocklockA shared lock to synchronize access.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description MemoryStorageService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDestroy()protected voiddoInitialize()protected TimerTaskgetCleanupTask()protected Map<String,Map<String,MutableStorageRecord<?>>>getContextMap()protected ReadWriteLockgetLock()booleanisClustered()booleanisServerSide()-
Methods inherited from class org.opensaml.storage.AbstractMapBackedStorageService
create, delete, deleteContext, deleteImpl, deleteWithVersion, read, read, readImpl, reap, reapWithLock, setDirty, update, updateContextExpiration, updateExpiration, updateImpl, updateWithVersion
-
Methods inherited from class org.opensaml.storage.AbstractStorageService
create, create, delete, deleteWithVersion, getCapabilities, getCleanupInterval, getCleanupTaskTimer, getContextSize, getKeySize, getValueSize, read, setCleanupInterval, setCleanupTaskTimer, setContextSize, setKeySize, setValueSize, update, update, updateExpiration, updateWithVersion, updateWithVersion
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Methods inherited from interface org.opensaml.storage.StorageCapabilities
getContextSize, getKeySize, getValueSize
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
contextMap
@NonnullAfterInit @NonnullElements private Map<String,Map<String,MutableStorageRecord<?>>> contextMap
Map of contexts.
-
lock
@NonnullAfterInit private ReadWriteLock lock
A shared lock to synchronize access.
-
-
Method Detail
-
isServerSide
public boolean isServerSide()
- Specified by:
isServerSidein interfaceStorageCapabilitiesEx
-
isClustered
public boolean isClustered()
- Specified by:
isClusteredin interfaceStorageCapabilitiesEx
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractStorageService- Throws:
ComponentInitializationException
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractStorageService
-
getContextMap
@Nonnull @NonnullElements @Live protected Map<String,Map<String,MutableStorageRecord<?>>> getContextMap()
- Specified by:
getContextMapin classAbstractMapBackedStorageService
-
getLock
@Nonnull protected ReadWriteLock getLock()
- Specified by:
getLockin classAbstractMapBackedStorageService
-
getCleanupTask
@Nullable protected TimerTask getCleanupTask()
- Overrides:
getCleanupTaskin classAbstractStorageService
-
-