private void trimStrongReferencesIfNecessary() {
        //trim the strong ref queue if necessary:
        while (strongReferences.size() > retentionSize) {
            strongReferences.poll();
        }
    }
Creates a {@code SoftHashMap} backed by the specified {@code source}, with the specified retention size.
<p/>
The retention size (n) is the total number of most recent entries in the map that will be strongly referenced
(i.e.'retained') to prevent them from being eagerly garbage collected.  That is, the point of a SoftHashMap is to
allow the garbage collector to remove as many entries from this map as it desires, but there will always be (n)
elements retained after a GC due to the strong references.
<p/>
Note that in a highly concurrent environments the exact total number of strong references may differ slightly
than the actual <code>retentionSize</code> value.  This number is intended to be a best-effort retention low
water mark.

@param source        the backing map to populate this {@code SoftHashMap}
@param retentionSize the total number of most recent entries in the map that will be strongly referenced
                     (retained), preventing them from being eagerly garbage collected by the JVM.
lang/src/main/java/org/apache/shiro/lang/util/SoftHashMap.java