class CheckpointCoordinator {

	public CompletableFuture<CompletedCheckpoint> triggerSavepoint(
			long timestamp,
			@Nullable String targetLocation) {

		CheckpointProperties props = CheckpointProperties.forSavepoint();

		CheckpointTriggerResult triggerResult = triggerCheckpoint(
			timestamp,
			props,
			targetLocation,
			false);

		if (triggerResult.isSuccess()) {
			return triggerResult.getPendingCheckpoint().getCompletionFuture();
		} else {
			Throwable cause = new CheckpointTriggerException("Failed to trigger savepoint.", triggerResult.getFailureReason());
			return FutureUtils.completedExceptionally(cause);
		}
	}

	public  CheckpointCoordinator(
			JobID job,
			long baseInterval,
			long checkpointTimeout,
			long minPauseBetweenCheckpoints,
			int maxConcurrentCheckpointAttempts,
			CheckpointRetentionPolicy retentionPolicy,
			ExecutionVertex[] tasksToTrigger,
			ExecutionVertex[] tasksToWaitFor,
			ExecutionVertex[] tasksToCommitTo,
			CheckpointIDCounter checkpointIDCounter,
			CompletedCheckpointStore completedCheckpointStore,
			StateBackend checkpointStateBackend,
			Executor executor,
			SharedStateRegistryFactory sharedStateRegistryFactory);

}