Package net.shibboleth.oidc.metadata
Class MetadataManagementData<MetadataIdentifier>
- java.lang.Object
-
- net.shibboleth.oidc.metadata.MetadataManagementData<MetadataIdentifier>
-
- Type Parameters:
MetadataIdentifier- the key to the stored object.
public class MetadataManagementData<MetadataIdentifier> extends Object
Class that holds management data about an entities metadata.
-
-
Field Summary
Fields Modifier and Type Field Description private InstantexpirationTimeExpiration time of the associated metadata.private MetadataIdentifieridThe identifier of the entity managed by this instance.private InstantlastAccessedTimeThe last time at which the entity's backing store data was accessed.private InstantlastUpdateTimeLast update time of the associated metadata.private InstantrefreshTriggerTimeTime at which should start attempting to refresh the metadata.private StampedLockstmpLockRead-write stamped lock which governs access to the metadata's backing store data.
-
Constructor Summary
Constructors Constructor Description MetadataManagementData(MetadataIdentifier identifier)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetExpirationTime()Get the expiration time of the metadata.MetadataIdentifiergetID()Get the entity ID managed by this instance.InstantgetLastAccessedTime()Get the last time at which the entity's backing store data was accessed.InstantgetLastUpdateTime()Get the last update time of the metadata.InstantgetRefreshTriggerTime()Get the refresh trigger time of the metadata.StampedLockgetStampLock()Get the read-write lock instance which governs access to the metadata's backing store data.voidrecordEntityAccess()Record access of the entity's backing store data.voidsetExpirationTime(Instant dateTime)Set the expiration time of the metadata.voidsetLastUpdateTime(Instant dateTime)Set the last update time of the metadata.voidsetRefreshTriggerTime(Instant dateTime)Set the refresh trigger time of the metadata.
-
-
-
Field Detail
-
id
@Nonnull private final MetadataIdentifier id
The identifier of the entity managed by this instance.
-
lastUpdateTime
@Nullable private Instant lastUpdateTime
Last update time of the associated metadata.
-
expirationTime
private Instant expirationTime
Expiration time of the associated metadata.
-
refreshTriggerTime
private Instant refreshTriggerTime
Time at which should start attempting to refresh the metadata.
-
lastAccessedTime
private Instant lastAccessedTime
The last time at which the entity's backing store data was accessed.
-
stmpLock
private final StampedLock stmpLock
Read-write stamped lock which governs access to the metadata's backing store data.
-
-
Constructor Detail
-
MetadataManagementData
public MetadataManagementData(@Nonnull MetadataIdentifier identifier)Constructor.- Parameters:
identifier- the entity ID managed by this instance
-
-
Method Detail
-
getID
@Nonnull public MetadataIdentifier getID()
Get the entity ID managed by this instance.- Returns:
- the entity ID
-
getLastUpdateTime
@Nullable public Instant getLastUpdateTime()
Get the last update time of the metadata.- Returns:
- the last update time, or null if no metadata is yet loaded for the entity
-
setLastUpdateTime
public void setLastUpdateTime(@Nonnull Instant dateTime)Set the last update time of the metadata.- Parameters:
dateTime- the last update time
-
getExpirationTime
@Nullable public Instant getExpirationTime()
Get the expiration time of the metadata.- Returns:
- the expiration time
-
setExpirationTime
public void setExpirationTime(@Nonnull Instant dateTime)Set the expiration time of the metadata.- Parameters:
dateTime- the new expiration time
-
getRefreshTriggerTime
@Nullable public Instant getRefreshTriggerTime()
Get the refresh trigger time of the metadata.- Returns:
- the refresh trigger time
-
setRefreshTriggerTime
public void setRefreshTriggerTime(@Nonnull Instant dateTime)Set the refresh trigger time of the metadata.- Parameters:
dateTime- the new refresh trigger time
-
getLastAccessedTime
@Nullable public Instant getLastAccessedTime()
Get the last time at which the entity's backing store data was accessed.- Returns:
- last access time
-
recordEntityAccess
public void recordEntityAccess()
Record access of the entity's backing store data.
-
getStampLock
@Nonnull public StampedLock getStampLock()
Get the read-write lock instance which governs access to the metadata's backing store data.- Returns:
- the lock instance
-
-