public int size() {
        final Map<K, V> map = ref != null ? ref.get() : null;
        return map != null? map.size() : 0;
    }
Returns the cache size.
@return the cache size
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/SoftCache.java