Package org.eclipse.jgit.transport.sshd
Interface KeyCache
-
- All Known Implementing Classes:
JGitKeyCache
public interface KeyCache
A cache forKeyPair
s.- Since:
- 5.2
-
-
Method Detail
-
get
KeyPair get(Path path, Function<? super Path,? extends KeyPair> loader)
Obtains aKeyPair
from 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
, ornull
if not present and could not be loaded
-
close
void close()
Removes allKeyPair
from this cache and destroys their private keys. This cache instance must not be used anymore thereafter.
-
-