Class MonitoredFileStore<V extends Identifiable>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.IndexedStreamStore<V>
-
- edu.uiuc.ncsa.security.storage.FileStore<V>
-
- edu.uiuc.ncsa.security.storage.monitored.MonitoredFileStore<V>
-
- All Implemented Interfaces:
Store<V>,MonitoredStoreInterface<V>,Map<Identifier,V>
public abstract class MonitoredFileStore<V extends Identifiable> extends FileStore<V> implements MonitoredStoreInterface<V>
Created by Jeff Gaynor
on 3/29/23 at 10:00 AM
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.storage.FileStore
indexDirectory, storageDirectory
-
Fields inherited from class edu.uiuc.ncsa.security.storage.IndexedStreamStore
converter, identifiableProvider, initializer
-
Fields inherited from interface edu.uiuc.ncsa.security.core.Store
VERSION_TAG
-
-
Constructor Summary
Constructors Constructor Description MonitoredFileStore(File directory, IdentifiableProvider<V> idp, MapConverter<V> cp, boolean removeEmptyFiles, boolean removeFailedFiles)MonitoredFileStore(File storeDirectory, File indexDirectory, IdentifiableProvider<V> identifiableProvider, MapConverter<V> converter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
Method Summary
-
Methods inherited from class edu.uiuc.ncsa.security.storage.FileStore
checkPermissions, clear, containsKey, containsValue, create, createIndexEntry, delete, doSetup, entrySet, getAll, getIndexDirectory, getIndexEntry, getItemFile, getItemFile, getMapConverter, getStorageDirectory, getXMLConverter, keySet, loadByIdentifier, loadFile, loadFromIndex, putAll, realRemove, realSave, register, remove, remove, removeByID, removeIndexEntry, save, search, search, search, search, setIndexDirectory, setStorageDirectory, size, size, toString, update, update, values
-
Methods inherited from class edu.uiuc.ncsa.security.storage.IndexedStreamStore
createIndexEntry, getCreatedItems, hashString, isEmpty, loadStream, put, put
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
MonitoredFileStore
public MonitoredFileStore(File storeDirectory, File indexDirectory, IdentifiableProvider<V> identifiableProvider, MapConverter<V> converter, boolean removeEmptyFiles, boolean removeFailedFiles)
-
MonitoredFileStore
public MonitoredFileStore(File directory, IdentifiableProvider<V> idp, MapConverter<V> cp, boolean removeEmptyFiles, boolean removeFailedFiles)
-
-
Method Detail
-
getMostRecent
public List<V> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecentin interfaceStore<V extends Identifiable>
-
getLastAccessedEventListeners
public List<LastAccessedEventListener> getLastAccessedEventListeners()
- Specified by:
getLastAccessedEventListenersin interfaceMonitoredStoreInterface<V extends Identifiable>
-
getUuid
public UUID getUuid()
- Specified by:
getUuidin interfaceMonitoredStoreInterface<V extends Identifiable>
-
addLastAccessedEventListener
public void addLastAccessedEventListener(LastAccessedEventListener lastAccessedEventListener)
- Specified by:
addLastAccessedEventListenerin interfaceMonitoredStoreInterface<V extends Identifiable>
-
fireLastAccessedEvent
public void fireLastAccessedEvent(MonitoredStoreInterface store, Identifier identifier)
- Specified by:
fireLastAccessedEventin interfaceMonitoredStoreInterface<V extends Identifiable>
-
isMonitorEnabled
public boolean isMonitorEnabled()
Description copied from interface:MonitoredStoreInterfaceGenerally this is enabled, except in things like the CLI where you do not want to monitor access to clients or whatever.- Specified by:
isMonitorEnabledin interfaceMonitoredStoreInterface<V extends Identifiable>- Returns:
-
setMonitorEnabled
public void setMonitorEnabled(boolean x)
- Specified by:
setMonitorEnabledin interfaceMonitoredStoreInterface<V extends Identifiable>
-
lastAccessUpdate
public void lastAccessUpdate(IDMap idMap)
- Specified by:
lastAccessUpdatein interfaceMonitoredStoreInterface<V extends Identifiable>
-
get
public V get(Object key)
Description copied from class:FileStoreThis updates the last accessed listener- Specified by:
getin interfaceMap<Identifier,V extends Identifiable>- Overrides:
getin classFileStore<V extends Identifiable>
-
setUpkeepConfiguration
public void setUpkeepConfiguration(UpkeepConfiguration upkeepConfiguration)
- Specified by:
setUpkeepConfigurationin interfaceMonitoredStoreInterface<V extends Identifiable>
-
getUpkeepConfiguration
public UpkeepConfiguration getUpkeepConfiguration()
- Specified by:
getUpkeepConfigurationin interfaceMonitoredStoreInterface<V extends Identifiable>
-
doUpkeep
public UpkeepResponse doUpkeep(AbstractEnvironment environment)
Description copied from interface:MonitoredStoreInterfaceDo 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:
doUpkeepin interfaceMonitoredStoreInterface<V extends Identifiable>- Returns:
-
doUpkeep
public UpkeepResponse doUpkeep(UpkeepConfiguration upkeepConfiguration, AbstractEnvironment environment)
- Specified by:
doUpkeepin interfaceMonitoredStoreInterface<V extends Identifiable>
-
updateHook
public long updateHook(String action, AbstractEnvironment environment, List<Identifier> identifiers)
- Specified by:
updateHookin interfaceMonitoredStoreInterface<V extends Identifiable>
-
hasUpkeepConfiguration
public boolean hasUpkeepConfiguration()
- Specified by:
hasUpkeepConfigurationin interfaceMonitoredStoreInterface<V extends Identifiable>
-
-