@Publicpublic interface CheckpointedFunction { /** * This method is called when a snapshot for a checkpoint is requested. This acts as a hook to * the function to ensure that all state is exposed by means previously offered through {@link * FunctionInitializationContext} when the Function was initialized, or offered now by {@link * FunctionSnapshotContext} itself. * * @param context the context for drawing a snapshot of the operator * @throws Exception Thrown, if state could not be created ot restored. */ void snapshotState(FunctionSnapshotContext context) throws Exception; /** * This method is called when the parallel function instance is created during distributed * execution. Functions typically set up their state storing data structures in this method. * * @param context the context for initializing the operator * @throws Exception Thrown, if state could not be created ot restored. */ void initializeState(FunctionInitializationContext context) throws Exception;}