Class RepoRefCache

    • Constructor Detail

      • RepoRefCache

        public RepoRefCache​(org.eclipse.jgit.lib.Repository repo)
    • Method Detail

      • get

        public Optional<org.eclipse.jgit.lib.ObjectId> get​(String refName)
                                                    throws IOException
        Description copied from interface: RefCache
        Get the possibly-cached value of a ref.
        Specified by:
        get in interface RefCache
        Parameters:
        refName - name of the ref.
        Returns:
        value of the ref; absent if the ref does not exist in the repo. Never null, and never present with a value of ObjectId.zeroId().
        Throws:
        IOException
      • getCachedRefs

        public Map<String,​Optional<org.eclipse.jgit.lib.ObjectId>> getCachedRefs()
        Returns:
        an unmodifiable view of the refs that have been cached by this instance.