uk.gov.ida.saml.hub.validators.authnrequest.ConcurrentMapIdExpirationCache Maven / Gradle / Ivy
package uk.gov.ida.saml.hub.validators.authnrequest;
import org.joda.time.DateTime;
import java.util.concurrent.ConcurrentMap;
public class ConcurrentMapIdExpirationCache implements IdExpirationCache {
private final ConcurrentMap map;
public ConcurrentMapIdExpirationCache(ConcurrentMap map) {
this.map = map;
}
@Override
public boolean contains(T key) {
return map.containsKey(key);
}
@Override
public DateTime getExpiration(T key) {
return map.get(key);
}
@Override
public void setExpiration(T key, DateTime expirationTime) {
map.put(key, expirationTime);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy