Class MonitoredMemoryStore<V extends Identifiable>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<Identifier,V>
-
- edu.uiuc.ncsa.security.storage.MemoryStore<V>
-
- edu.uiuc.ncsa.security.storage.monitored.MonitoredMemoryStore<V>
-
- All Implemented Interfaces:
Store<V>
,MonitoredStoreInterface<V>
,Serializable
,Cloneable
,Map<Identifier,V>
public abstract class MonitoredMemoryStore<V extends Identifiable> extends MemoryStore<V> implements MonitoredStoreInterface<V>
Created by Jeff Gaynor
on 3/29/23 at 12:43 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
MemoryStore.MSInitializer
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
identifiableProvider
-
Fields inherited from interface edu.uiuc.ncsa.security.core.Store
VERSION_TAG
-
-
Constructor Summary
Constructors Constructor Description MonitoredMemoryStore(IdentifiableProvider<V> identifiableProvider)
-
Method Summary
-
Methods inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
create, getAll, getInitializer, getMapConverter, realSave, register, remove, save, search, search, search, size, update
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
MonitoredMemoryStore
public MonitoredMemoryStore(IdentifiableProvider<V> identifiableProvider)
-
-
Method Detail
-
getMostRecent
public List<V> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecent
in interfaceStore<V extends Identifiable>
-
getLastAccessedEventListeners
public List<LastAccessedEventListener> getLastAccessedEventListeners()
- Specified by:
getLastAccessedEventListeners
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
getUuid
public UUID getUuid()
- Specified by:
getUuid
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
addLastAccessedEventListener
public void addLastAccessedEventListener(LastAccessedEventListener lastAccessedEventListener)
- Specified by:
addLastAccessedEventListener
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
fireLastAccessedEvent
public void fireLastAccessedEvent(MonitoredStoreInterface store, Identifier identifier)
- Specified by:
fireLastAccessedEvent
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
isMonitorEnabled
public boolean isMonitorEnabled()
Description copied from interface:MonitoredStoreInterface
Generally this is enabled, except in things like the CLI where you do not want to monitor access to clients or whatever.- Specified by:
isMonitorEnabled
in interfaceMonitoredStoreInterface<V extends Identifiable>
- Returns:
-
setMonitorEnabled
public void setMonitorEnabled(boolean x)
- Specified by:
setMonitorEnabled
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
lastAccessUpdate
public void lastAccessUpdate(IDMap idMap)
- Specified by:
lastAccessUpdate
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
get
public V get(Object key)
- Specified by:
get
in interfaceMap<Identifier,V extends Identifiable>
- Overrides:
get
in classHashMap<Identifier,V extends Identifiable>
-
setUpkeepConfiguration
public void setUpkeepConfiguration(UpkeepConfiguration upkeepConfiguration)
- Specified by:
setUpkeepConfiguration
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
getUpkeepConfiguration
public UpkeepConfiguration getUpkeepConfiguration()
- Specified by:
getUpkeepConfiguration
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
doUpkeep
public UpkeepResponse doUpkeep(AbstractEnvironment environment)
Description copied from interface:MonitoredStoreInterface
Do the upkeep. Note that some stores may have to update other stores. The environment allows for this. E.g. Deleting a client should delete its approval record and remove any permissions associated with it.- Specified by:
doUpkeep
in interfaceMonitoredStoreInterface<V extends Identifiable>
- Returns:
-
doUpkeep
public UpkeepResponse doUpkeep(UpkeepConfiguration upkeepConfiguration, AbstractEnvironment environment)
- Specified by:
doUpkeep
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
updateHook
public long updateHook(String action, AbstractEnvironment environment, List<Identifier> identifiers)
- Specified by:
updateHook
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
getXMLConverter
public XMLConverter<V> getXMLConverter()
- Specified by:
getXMLConverter
in interfaceStore<V extends Identifiable>
-
hasUpkeepConfiguration
public boolean hasUpkeepConfiguration()
- Specified by:
hasUpkeepConfiguration
in interfaceMonitoredStoreInterface<V extends Identifiable>
-
-