private void addSpan(CacheSpan span){
  TreeSet<CacheSpan> spansForKey=cachedSpans.get(span.key);
  if (spansForKey == null) {
    spansForKey=new TreeSet<>();
    cachedSpans.put(span.key,spansForKey);
  }
  spansForKey.add(span);
  totalSpace+=span.length;
  notifySpanAdded(span);
}

private void addSpan ( CacheSpan span ) { TreeSet < CacheSpan > spansForKey = cachedSpans . get ( span . key ) ; if ( spansForKey == null ) { spansForKey = new TreeSet < > ( ) ; cachedSpans . put ( span . key , spansForKey ) ; } spansForKey . add ( span ) ; totalSpace += span . length ; notifySpanAdded ( span ) ; }
adds a cached span to the in - memory representation .
