public long free(long toFree) {
      if (LOG.isTraceEnabled()) {
        LOG.trace("freeing " + StringUtils.byteDesc(toFree) + " from " + this);
      }
      LruCachedBlock cb;
      long freedBytes = 0;
      while ((cb = queue.pollLast()) != null) {
        freedBytes += evictBlock(cb, true);
        if (freedBytes >= toFree) {
          return freedBytes;
        }
      }
      if (LOG.isTraceEnabled()) {
        LOG.trace("freed " + StringUtils.byteDesc(freedBytes) + " from " + this);
      }
      return freedBytes;
    }
Used to group blocks into priority buckets. There will be a BlockBucket for each priority
(single, multi, memory). Once bucketed, the eviction algorithm takes the appropriate number of
elements out of each according to configuration parameters and their relatives sizes.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java