Code example for Cache

Methods: put

0
        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 
    public final synchronized int incrementInt(final String key, final int amount) {
        int newValue = opt(key, amount);
        put(key, newValue);
        return newValue;