Package org.eclipse.jgit.transport.sshd
Interface KeyCache
-
- All Known Implementing Classes:
JGitKeyCache
public interface KeyCacheA cache forKeyPairs.- Since:
- 5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Removes allKeyPairfrom this cache and destroys their private keys.java.security.KeyPairget(java.nio.file.Path path, java.util.function.Function<? super java.nio.file.Path,? extends java.security.KeyPair> loader)Obtains aKeyPairfrom the cache.
-
-
-
Method Detail
-
get
java.security.KeyPair get(java.nio.file.Path path, java.util.function.Function<? super java.nio.file.Path,? extends java.security.KeyPair> loader)Obtains aKeyPairfrom the cache. Implementations must be thread-safe.- Parameters:
path- of the keyloader- to load the key if it isn't present in the cache yet- Returns:
- the
KeyPair, ornullif not present and could not be loaded
-
close
void close()
Removes allKeyPairfrom this cache and destroys their private keys. This cache instance must not be used anymore thereafter.
-
-