Class JGitKeyCache

    • Constructor Detail

      • JGitKeyCache

        public JGitKeyCache()
    • Method Detail

      • get

        public KeyPair get​(Path path,
                           Function<? super Path,​? extends KeyPair> loader)
        Description copied from interface: KeyCache
        Obtains a KeyPair from the cache. Implementations must be thread-safe.
        Specified by:
        get in interface KeyCache
        Parameters:
        path - of the key
        loader - to load the key if it isn't present in the cache yet
        Returns:
        the KeyPair, or null if not present and could not be loaded
      • close

        public void close()
        Description copied from interface: KeyCache
        Removes all KeyPair from this cache and destroys their private keys. This cache instance must not be used anymore thereafter.
        Specified by:
        close in interface KeyCache