All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nflow.engine.service.MaintenanceResults Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package io.nflow.engine.service;

/**
 * Represent maintenance operation results.
 */
public class MaintenanceResults {

  /**
   * Number of workflows archived.
   */
  public final int archivedWorkflows;

  /**
   * Number of workflows deleted from archive table.
   */
  public final int deletedArchivedWorkflows;

  /**
   * Number of workflows deleted from main table.
   */
  public final int deletedWorkflows;

  MaintenanceResults(int archivedWorkflows, int deletedArchivedWorkflows, int deletedWorkflows) {
    this.archivedWorkflows = archivedWorkflows;
    this.deletedArchivedWorkflows = deletedArchivedWorkflows;
    this.deletedWorkflows = deletedWorkflows;
  }

  /**
   * Build MaintenanceResults objects.
   */
  public static class Builder {

    private int archivedWorkflows;
    private int deletedArchivedWorkflows;
    private int deletedWorkflows;

    /**
     * Set number of workflows archived.
     *
     * @param archivedWorkflows
     *          Number of workflows archived.
     * @return this
     */
    public Builder setArchivedWorkflows(int archivedWorkflows) {
      this.archivedWorkflows = archivedWorkflows;
      return this;
    }

    /**
     * Set number of archived workflows deleted.
     *
     * @param deletedArchivedWorkflows
     *          Number of archived workflows deleted.
     * @return this
     */
    public Builder setDeletedArchivedWorkflows(int deletedArchivedWorkflows) {
      this.deletedArchivedWorkflows = deletedArchivedWorkflows;
      return this;
    }

    /**
     * Set number of workflows deleted.
     *
     * @param deletedWorkflows
     *          Number of workflows deleted.
     * @return this
     */
    public Builder setDeletedWorkflows(int deletedWorkflows) {
      this.deletedWorkflows = deletedWorkflows;
      return this;
    }

    /**
     * Build MaintenanceResults object.
     *
     * @return MaintenanceResults object.
     */
    public MaintenanceResults build() {
      return new MaintenanceResults(archivedWorkflows, deletedArchivedWorkflows, deletedWorkflows);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy