Search in sources :

Example 1 with ConcurrentReferenceHashMap

use of org.datanucleus.util.ConcurrentReferenceHashMap in project datanucleus-core by datanucleus.

the class FetchPlan method cacheIsToCallPostLoadFetchPlan.

void cacheIsToCallPostLoadFetchPlan(AbstractClassMetaData cmd, BitSet loadedFields, Boolean itcplfp) {
    if (isToCallPostLoadFetchPlanByCmd == null) {
        isToCallPostLoadFetchPlanByCmd = new ConcurrentReferenceHashMap<>(1, ReferenceType.STRONG, ReferenceType.SOFT);
    }
    Map cachedIsToCallPostLoadFetchPlan = isToCallPostLoadFetchPlanByCmd.get(cmd);
    if (cachedIsToCallPostLoadFetchPlan == null) {
        cachedIsToCallPostLoadFetchPlan = new ConcurrentReferenceHashMap<>(1, ReferenceType.STRONG, ReferenceType.SOFT);
        isToCallPostLoadFetchPlanByCmd.put(cmd, cachedIsToCallPostLoadFetchPlan);
    }
    cachedIsToCallPostLoadFetchPlan.put(loadedFields, itcplfp);
}
Also used : HashMap(java.util.HashMap) ConcurrentReferenceHashMap(org.datanucleus.util.ConcurrentReferenceHashMap) Map(java.util.Map)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 ConcurrentReferenceHashMap (org.datanucleus.util.ConcurrentReferenceHashMap)1