/**
   * Sets maximum allowed size of cache before entry will start getting evicted.
   *
   * @param max Maximum allowed size of cache before entry will start getting evicted.
   */
  @Override
  public void setMaxSize(int max) {
    A.ensure(max > 0, "max > 0");

    this.max = max;
  }
  /**
   * Constructs random eviction policy with maximum size.
   *
   * @param max Maximum allowed size of cache before entry will start getting evicted.
   */
  public RandomEvictionPolicy(int max) {
    A.ensure(max > 0, "max > 0");

    this.max = max;
  }