Interface RepositoryCallback<T>

  • All Superinterfaces:
    Serializable

    public interface RepositoryCallback<T>
    extends Serializable
    Code that gets executed on the machine where the working directory is local and Repository object is accessible. If necessary, the closure will be serialized and sent to remote.
    See Also:
    FilePath.FileCallable
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T invoke​(org.eclipse.jgit.lib.Repository repo, hudson.remoting.VirtualChannel channel)
      Performs the computational task on the node where the data is located.
    • Method Detail

      • invoke

        T invoke​(org.eclipse.jgit.lib.Repository repo,
                 hudson.remoting.VirtualChannel channel)
          throws IOException,
                 InterruptedException
        Performs the computational task on the node where the data is located.

        All the exceptions are forwarded to the caller.

        Parameters:
        repo - Entry point to the git database. Caller is responsible for closing the repository.
        channel - The "back pointer" of the Channel that represents the communication with the node from where the code was sent.
        Returns:
        a T object.
        Throws:
        IOException - if any IO failure
        InterruptedException - if interrupted.