public void persist ( ) throws Exception { if ( ! mapping . equals ( initialMapping ) ) { state . clear ( ) ; for ( Map . Entry < W , W > window : mapping . entrySet ( ) ) { state . add ( new Tuple2 <> ( window . getKey ( ) , window . getValue ( ) ) ) ; } } }
Persist the updated mapping to the given state if the mapping changed since initialization .