private void updatePersistentData(Bucket toDelete) {
        if (toDelete == null) {
            return;
        }
        long millis = toDelete.gotTimeStamps ? toDelete.toMillis : System.currentTimeMillis();
        for (Map.Entry<String, List<Entry<Point, UntypedMetric>>> metric : toDelete.getValuesByMetricName().entrySet()) {
            LinkedHashMap<Point, TimeStampedMetric> cachedPoints = getCachedMetric(metric.getKey());

            for (Entry<Point, UntypedMetric> newestInterval : metric.getValue()) {
                // overwriting an existing entry does not update the order
                // in the map
                cachedPoints.remove(newestInterval.getKey());
                TimeStampedMetric toInsert = new TimeStampedMetric(millis, newestInterval.getValue());
                cachedPoints.put(newestInterval.getKey(), toInsert);
            }
        }
    }
The persistence layer for metrics. Both CPU and memory hungry, but
it runs in its own little world.

@author Steinar Knutsen
container-core/src/main/java/com/yahoo/metrics/simple/DimensionCache.java