code: public static int getMaxSizePerNode(MaxSizeConfig maxSizeConfig) {
          // max size or -1 if policy is different or not set
          double maxSizePerNode = maxSizeConfig.getMaxSizePolicy() == PER_NODE ? maxSizeConfig.getSize() : -1D;
  
          if (maxSizePerNode == MaxSizeConfig.DEFAULT_MAX_SIZE) {
              // unlimited
              return -1;
          }
  
          return (int) maxSizePerNode;
      }
docs: Returns the configured maximum entry count per node if the max
  size policy is {@link MaxSizeConfig.MaxSizePolicy#PER_NODE}
  and is not the default, otherwise returns {@code -1}.
  
  @param maxSizeConfig the max size configuration
  @return the max size per node or {@code -1} if not configured or is the default
  @see MaxSizeConfig#getMaxSizePolicy()
  @see MaxSizeConfig#getSize()