All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.gov.ida.saml.hub.validators.authnrequest.ConcurrentMapIdExpirationCache Maven / Gradle / Ivy

There is a newer version: 3.4.6-15872
Show newest version
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