Refactored CheckpointAlgorithmAdapter to be stateful