Code example for Cache

Methods: getIfPresent

0
        return TimeUnit.MINUTES.toMillis(this.timeToKeepAfterAccessInMinutes);
    } 
 
    @Override 
    public final synchronized boolean containsKey(final String key) {
        return this.registry.getIfPresent(key) != null;
    } 
 
    @Override 
    public final synchronized void put(final String key, final URI value) {
        this.registry.put(key, value);
    } 
 
    @Override 
    public final synchronized long incrementLong(final String key, final long amount) {
        long newValue = opt(key, amount);
        put(key, newValue);
        return newValue;
    } 
 
    @Override