code: public static ScalingPolicy fixed(int numSegments) {
          Preconditions.checkArgument(numSegments > 0, "Number of segments should be > 0.");
          return new ScalingPolicy(ScaleType.FIXED_NUM_SEGMENTS, 0, 0, numSegments);
      }
docs: Create a scaling policy to configure a stream to have a fixed number of segments.
  
  @param numSegments Fixed number of segments for the stream.
  @return Scaling policy object.