Class AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper
java.lang.Object
java.util.TimerTask
org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AbstractDynamicMetadataResolver
Background maintenance task which cleans expired and idle metadata from the backing store, and removes
orphaned entity management data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
isRemoveData
(AbstractDynamicMetadataResolver.EntityManagementData mgmtData, Instant now, Instant earliestValidLastAccessed) Determine whether metadata should be removed based on expiration and idle time data.private void
Purge metadata which is either 1) expired or 2) (ifAbstractDynamicMetadataResolver.isRemoveIdleEntityData()
is true) which hasn't been accessed within the lastAbstractDynamicMetadataResolver.getMaxIdleEntityData()
duration.void
run()
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger.
-
-
Constructor Details
-
BackingStoreCleanupSweeper
protected BackingStoreCleanupSweeper()
-
-
Method Details
-
run
public void run() -
removeExpiredAndIdleMetadata
private void removeExpiredAndIdleMetadata()Purge metadata which is either 1) expired or 2) (ifAbstractDynamicMetadataResolver.isRemoveIdleEntityData()
is true) which hasn't been accessed within the lastAbstractDynamicMetadataResolver.getMaxIdleEntityData()
duration. -
isRemoveData
private boolean isRemoveData(@Nonnull AbstractDynamicMetadataResolver.EntityManagementData mgmtData, @Nonnull Instant now, @Nonnull Instant earliestValidLastAccessed) Determine whether metadata should be removed based on expiration and idle time data.- Parameters:
mgmtData
- the management data instance for the entitynow
- the current timeearliestValidLastAccessed
- the earliest last accessed time which would be valid- Returns:
- true if the entity is expired or exceeds the max idle time, false otherwise
-