com.ibm.fhir.persistence.jdbc.cache.NameIdCache Maven / Gradle / Ivy
/*
* (C) Copyright IBM Corp. 2020
*
* SPDX-License-Identifier: Apache-2.0
*/
package com.ibm.fhir.persistence.jdbc.cache;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.ibm.fhir.persistence.jdbc.dao.api.INameIdCache;
/**
* @param the type of the identity value held by the cache
*/
public class NameIdCache implements INameIdCache {
// We use LinkedHashMap for the local map because we also need to maintain order
// of insertion to make sure we have correct LRU behavior when updating the shared cache
private final ThreadLocal