code: public static long estimateMapCost(long size, boolean ordered, boolean usesCachedQueryableEntries) {
          long mapCost;
          if (ordered) {
              mapCost = BASE_CONCURRENT_SKIP_LIST_MAP_COST + size * CONCURRENT_SKIP_LIST_MAP_ENTRY_COST;
          } else {
              mapCost = BASE_CONCURRENT_HASH_MAP_COST + size * CONCURRENT_HASH_MAP_ENTRY_COST;
          }
  
          long queryableEntriesCost;
          if (usesCachedQueryableEntries) {
              queryableEntriesCost = size * CACHED_QUERYABLE_ENTRY_COST;
          } else {
              queryableEntriesCost = size * QUERY_ENTRY_COST;
          }
  
          return mapCost + queryableEntriesCost;
      }
docs: Estimates the on-heap memory cost of a map backing an index.
  
  @param size                      the size of the map to estimate the cost
  of.
  @param ordered                   {@code true} if the index managing the
  map being estimated is ordered, {@code
  false} otherwise.
  @param usesCachedQueryableEntries {@code true} if queryable entries indexed
  by the associated index are cached, {@code
  false} otherwise.
  @return the estimated map cost.