Interface Mirror


public interface Mirror
Contains the properties for a mirroring task and performs the task.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the authentication credentials which are required when accessing the Git repositories.
    Returns the direction of the mirroring task.
    Returns a gitignore pattern for the files which won't be mirrored.
    Returns the path in the Central Dogma repository where is supposed to keep the mirrored files.
    Returns the Central Dogma repository where is supposed to keep the mirrored files.
    void
    mirror(File workDir, CommandExecutor executor, int maxNumFiles, long maxNumBytes)
    Performs the mirroring task.
    nextExecutionTime(ZonedDateTime lastExecutionTime)
    Returns the next execution time of the mirroring task.
    Returns the name of the branch in the Git repository where is supposed to be mirrored.
    Returns the path of the Git repository where is supposed to be mirrored.
    Returns the URI of the Git repository which will be mirrored from.
    com.cronutils.model.Cron
    Returns the schedule for the mirroring task.
  • Method Details

    • schedule

      com.cronutils.model.Cron schedule()
      Returns the schedule for the mirroring task.
    • nextExecutionTime

      ZonedDateTime nextExecutionTime(ZonedDateTime lastExecutionTime)
      Returns the next execution time of the mirroring task.
      Parameters:
      lastExecutionTime - the last execution time of the mirroring task
    • direction

      MirrorDirection direction()
      Returns the direction of the mirroring task.
    • credential

      MirrorCredential credential()
      Returns the authentication credentials which are required when accessing the Git repositories.
    • localRepo

      Repository localRepo()
      Returns the Central Dogma repository where is supposed to keep the mirrored files.
    • localPath

      String localPath()
      Returns the path in the Central Dogma repository where is supposed to keep the mirrored files.
    • remoteRepoUri

      URI remoteRepoUri()
      Returns the URI of the Git repository which will be mirrored from.
    • remotePath

      String remotePath()
      Returns the path of the Git repository where is supposed to be mirrored.
    • remoteBranch

      @Nullable String remoteBranch()
      Returns the name of the branch in the Git repository where is supposed to be mirrored.
    • gitignore

      @Nullable String gitignore()
      Returns a gitignore pattern for the files which won't be mirrored.
    • mirror

      void mirror(File workDir, CommandExecutor executor, int maxNumFiles, long maxNumBytes)
      Performs the mirroring task.
      Parameters:
      workDir - the local directory where keeps the mirrored files
      executor - the CommandExecutor which is used to perform operation to the Central Dogma storage
      maxNumFiles - the maximum number of files allowed to the mirroring task. A MirrorException would be raised if the number of files to be mirrored exceeds it.
      maxNumBytes - the maximum bytes allowed to the mirroring task. A MirrorException would be raised if the total size of the files to be mirrored exceeds it.