public static final StreamConfig decode ( String scope , String streamName , final StreamConfiguration configModel ) { Preconditions . checkNotNull ( configModel , "configModel" ) ; final StreamConfig . Builder builder = StreamConfig . newBuilder ( ) . setStreamInfo ( createStreamInfo ( scope , streamName ) ) . setScalingPolicy ( decode ( configModel . getScalingPolicy ( ) ) ) ; if ( configModel . getRetentionPolicy ( ) != null ) { builder . setRetentionPolicy ( decode ( configModel . getRetentionPolicy ( ) ) ) ; } return builder . build ( ) ; }
Converts StreamConfiguration into StreamConfig .