package com.atlassian.bitbucket.mirroring.mirror;

/**
 * Represents the progress state of a mirror's synchronization with its upstream server.
 *
 * @since 4.3
 */
public interface SyncProgress {
    /**
     * @return {@code true} if some synchronization work has started but the overall number of repositories needing
     *         synchronization hasn't been calculated yet, or {@code false otherwise}.
     */
    boolean getDiscovering();

    /**
     * @return While there is synchronization work ongoing, the number of repositories that have completed
     *         synchronization work, successfully or (in the case of unrecoverable errors) unsuccessfully.  If there is
     *         no synchronization work ongoing, returns {@code 0}.
     */
    int getSyncedRepos();

    /**
     * @return While there is synchronization work ongoing, the number of repositories that need synchronization work.
     *         If there is no synchronization work ongoing, returns {@code 0}.
     */
    int getTotalRepos();
}
