class ObjectIdentityMemCache<V extends IdentityCacheable> 
implements ObjectIdentityCache<V> {
    protected ConcurrentHashMap<String, V> map; 
    
    public ObjectIdentityMemCache() {
        map = new ConcurrentHashMap<String, V>();
    }
    
    public ObjectIdentityMemCache(int cap, float load, int conc) {
        map = new ConcurrentHashMap<String, V>(cap, load, conc);
    }

    public void close() {
        // do nothing
    }

    
    @Override
    public V get(String key) {
        // all gets are mutatable
        return getOrUse(key,null);
    }

    public V getOrUse(String key, Supplier<V> supplierOrNull) {<FILL_FUNCTION_BODY>}

    public int size() {
        return map.size();
    }

    public Set<String> keySet() {
        return map.keySet();
    }

    public void sync() {
        // do nothing
    }

    @Override
    public void dirtyKey(String key) {
        // do nothing: memory is whole cache        
    }

    /**
     * Offer raw map access for convenience of checkpoint/recovery.
     */
    public Map<String, V> getMap() {
        return map;
    }
}

        V val = map.get(key); 
        if (val==null && supplierOrNull!=null) {
            val = supplierOrNull.get(); 
            V prevVal = map.putIfAbsent(key, val);
            if(prevVal!=null) {
                val = prevVal; 
            }
        }
        if (val != null) {
            val.setIdentityCache(this);
        }
        return val; 
    
<no_super_class>