io.camunda.zeebe.gateway.admin.backup.BackupStatus Maven / Gradle / Ivy
/*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
* Licensed under the Camunda License 1.0. You may not use this file
* except in compliance with the Camunda License 1.0.
*/
package io.camunda.zeebe.gateway.admin.backup;
import java.util.List;
import java.util.Optional;
/**
* Shows the aggregated status of the backup and status of backup of each partition.
*
* Aggregates status is calculated as follows:
*
COMPLETED => If all partitions have completed backup
* FAILED => If backup of atleast one partition is failed
* DOES_NOT_EXIST => If backup of atleast one partition does not exist.
* IN_PROGRESS => Otherwise
*
* @param backupId id of the backup
* @param status aggregated status of backup
* @param failureReason If the status == FAILED, then provides a reason for failure
* @param partitions status of backup of all partitions
*/
public record BackupStatus(
long backupId,
State status,
Optional failureReason,
List partitions) {}