protected void registerContainerDeletionSyncTask(StateMachineEngine engine) {
    if (cloudConfig.cloudContainerCompactionEnabled) {
      Map<String, TaskFactory> taskFactoryMap = new HashMap<>();
      taskFactoryMap.put(DeprecatedContainerCloudSyncTask.COMMAND, new TaskFactory() {
        @Override
        public Task createNewTask(TaskCallbackContext context) {
          return new DeprecatedContainerCloudSyncTask(accountService, storeConfig.storeContainerDeletionRetentionDays,
              cloudDestination, vcrMetrics);
        }
      });
      if (!taskFactoryMap.isEmpty()) {
        if (engine.registerStateModelFactory(TaskConstants.STATE_MODEL_NAME,
            new TaskStateModelFactory(manager, taskFactoryMap))) {
          logger.info("Container deletion sync task registered with helix.");
        } else {
          vcrMetrics.deprecationSyncTaskRegistrationFailureCount.inc();
          logger.error("Container deletion sync task registration with helix failed.");
        }
      }
    }
  }
Register {@link DeprecatedContainerCloudSyncTask}s to sync deleted container information from account service to
VCR.

@param engine the {@link StateMachineEngine} to register the task state model.
ambry-cloud/src/main/java/com/github/ambry/cloud/HelixVcrClusterParticipant.java