Package com.identityworksllc.iiq.common
Class TempStorage
- java.lang.Object
-
- com.identityworksllc.iiq.common.TempStorage
-
- All Implemented Interfaces:
DelegatedMap<String,Object>,TypeFriendlyMap<String,Object>,Map<String,Object>
public final class TempStorage extends Object implements DelegatedMap<String,Object>, TypeFriendlyMap<String,Object>
An advanced Global Storage class that expands on IIQ’s CustomGlobal object.It allows simple get/set operations into a static global concurrent map, but also provides a mechanism for ThreadLocal and expiring values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TempStorageget()Gets the singleton object, creating a new one if it does not exist.Map<String,Object>getDelegate()Gets the internal CacheMap, required by DelegatedMap.booleanisCleanupDaemonRunning()Returns true if the background cleanup thread is running.voidstop()Stops the background thread by interrupting it-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.identityworksllc.iiq.common.DelegatedMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from interface com.identityworksllc.iiq.common.TypeFriendlyMap
getAs, getBoolean, getInt, getLong, getSailPointObject, getString, getStringList
-
-
-
-
Method Detail
-
get
public static TempStorage get()
Gets the singleton object, creating a new one if it does not exist.- Returns:
- The singleton TempStorage object
-
getDelegate
public Map<String,Object> getDelegate()
Gets the internal CacheMap, required by DelegatedMap.- Specified by:
getDelegatein interfaceDelegatedMap<String,Object>- Returns:
- The internal cache map
-
isCleanupDaemonRunning
public boolean isCleanupDaemonRunning()
Returns true if the background cleanup thread is running.Note that like
Thread.isAlive(), this method may not return true for a couple of seconds after the thread is initially started.- Returns:
- True if the background thread is running
-
stop
public void stop()
Stops the background thread by interrupting it
-
-