class RecreateOnResetOperatorCoordinator implements OperatorCoordinator {

	@Override
	public void resetToCheckpoint(byte[] checkpointData) throws Exception {
		// Quiesce the context so the coordinator cannot interact with the job master anymore.
		quiesceableContext.quiesce();
		// Close the coordinator.
		coordinator.close();
		// Create a new coordinator and reset to the checkpoint.
		quiesceableContext = new QuiesceableContext(quiesceableContext.getContext());
		coordinator = provider.getCoordinator(quiesceableContext);
		coordinator.resetToCheckpoint(checkpointData);
		// Start the new coordinator if this coordinator has been started before reset to the checkpoint.
		if (started) {
			coordinator.start();
		}
	}

	private  RecreateOnResetOperatorCoordinator(
			QuiesceableContext context,
			Provider provider);

}