Code example for MapMaker

0
        super(createMap(ephemeralTTLSeconds, TimeUnit.SECONDS));
    } 
     
    private static ConcurrentMap<NodeRef, LockState> createMap(long expiry, TimeUnit timeUnit)
    { 
        ConcurrentMap<NodeRef, LockState> map = new MapMaker()
                    .concurrencyLevel(32)
                    .expiration(expiry, timeUnit)
                    .makeMap(); 
        return map;
    } 
} 
Experience pair programming with AI  Get Codota for Java