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 ) ; }
Create a scaling policy to configure a stream to have a fixed number of segments .