protected Map<K, V> createCache(final int capacity, final float loadFactor, boolean synchro) {
        Map<K, V> cache = new CacheMap<>(capacity, loadFactor);
        if (synchro) {
            return Collections.synchronizedMap(cache);
        } else {
            return cache;
        }
    }
Creates the underlying cache map.
@param capacity the cache size, must be &gt; 0
@param loadFactor the cache load factor
@param synchro whether the cache is synchronized or not
@return a Map usable as a cache bounded to the given size
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/SoftCache.java