Class AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper
- java.lang.Object
-
- java.util.TimerTask
-
- org.opensaml.saml.metadata.resolver.impl.AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AbstractDynamicMetadataResolver
protected class AbstractDynamicMetadataResolver.BackingStoreCleanupSweeper extends TimerTask
Background maintenance task which cleans expired and idle metadata from the backing store, and removes orphaned entity management data.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBackingStoreCleanupSweeper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanisRemoveData(AbstractDynamicMetadataResolver.EntityManagementData mgmtData, Instant now, Instant earliestValidLastAccessed)Determine whether metadata should be removed based on expiration and idle time data.private voidremoveExpiredAndIdleMetadata()Purge metadata which is either 1) expired or 2) (ifAbstractDynamicMetadataResolver.isRemoveIdleEntityData()is true) which hasn't been accessed within the lastAbstractDynamicMetadataResolver.getMaxIdleEntityData()duration.voidrun()-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Method Detail
-
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
-
-