private synchronized void initializeMetadataCache(Configuration conf) { if (harMetaCache == null) { int cacheSize = conf.getInt(METADATA_CACHE_ENTRIES_KEY, METADATA_CACHE_ENTRIES_DEFAULT); harMetaCache = Collections.synchronizedMap(new LruCache<URI, HarMetaData>(cacheSize)); } }
private synchronized void initializeMetadataCache(Configuration conf) { if (harMetaCache == null) { int cacheSize = conf.getInt(METADATA_CACHE_ENTRIES_KEY, METADATA_CACHE_ENTRIES_DEFAULT); harMetaCache = Collections.synchronizedMap(new LruCache<URI, HarMetaData>(cacheSize)); } }
private synchronized void initializeMetadataCache(Configuration conf) { if (harMetaCache == null) { int cacheSize = conf.getInt(METADATA_CACHE_ENTRIES_KEY, METADATA_CACHE_ENTRIES_DEFAULT); harMetaCache = Collections.synchronizedMap(new LruCache<URI, HarMetaData>(cacheSize)); } }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > MAX_ENTRIES; } }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > MAX_ENTRIES; } }
private synchronized void initializeMetadataCache(Configuration conf) { if (harMetaCache == null) { int cacheSize = conf.getInt(METADATA_CACHE_ENTRIES_KEY, METADATA_CACHE_ENTRIES_DEFAULT); harMetaCache = Collections.synchronizedMap(new LruCache<URI, HarMetaData>(cacheSize)); } }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > MAX_ENTRIES; } }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > MAX_ENTRIES; } }
private synchronized void initializeMetadataCache(Configuration conf) { if (harMetaCache == null) { int cacheSize = conf.getInt(METADATA_CACHE_ENTRIES_KEY, METADATA_CACHE_ENTRIES_DEFAULT); harMetaCache = Collections.synchronizedMap(new LruCache<URI, HarMetaData>(cacheSize)); } }
@Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest) { return size() > MAX_ENTRIES; } }