code: protected EvictionChecker createCacheEvictionChecker(int size, MaxSizePolicy maxSizePolicy) {
          if (maxSizePolicy == null) {
              throw new IllegalArgumentException("Max-Size policy cannot be null");
          }
          if (maxSizePolicy == MaxSizePolicy.ENTRY_COUNT) {
              return new EntryCountCacheEvictionChecker(size, records, partitionCount);
          }
          return null;
      }
docs: Creates an instance for checking if the maximum cache size has been reached. Supports only the
  {@link MaxSizePolicy#ENTRY_COUNT} policy. Returns null if other {@code maxSizePolicy} is used.
  
  @param size          the maximum number of entries
  @param maxSizePolicy the way in which the size is interpreted, only the {@link MaxSizePolicy#ENTRY_COUNT} policy is
  supported.
  @return the instance which will check if the maximum number of entries has been reached or null if the
  {@code maxSizePolicy} is not {@link MaxSizePolicy#ENTRY_COUNT}
  @throws IllegalArgumentException if the {@code maxSizePolicy} is null