@ Nonnull public final TypeSerializer < T > previousSchemaSerializer ( ) { if ( cachedRestoredSerializer != null ) { return cachedRestoredSerializer ; } if ( previousSerializerSnapshot == null ) { throw new UnsupportedOperationException ( "This provider does not contain the state's previous serializer's snapshot. Cannot provider a serializer for previous schema." ) ; } this . cachedRestoredSerializer = previousSerializerSnapshot . restoreSerializer ( ) ; return cachedRestoredSerializer ; }
Gets the serializer that recognizes the previous serialization schema of the state . This is the serializer that should be used for restoring the state i . e . when the state is still in the previous serialization schema .