Interface CachingSigningKeyDatabase

All Superinterfaces:
SigningKeyDatabase
All Known Implementing Classes:
OpenSshSigningKeyDatabase

public interface CachingSigningKeyDatabase extends SigningKeyDatabase
A SigningKeyDatabase that caches data.

A signing key database may be used to check keys frequently; it may thus need to cache some data and it may need to cache data per repository. If an implementation does cache data, it is responsible itself for refreshing that cache at appropriate times. Clients can control the cache size somewhat via setCacheSize(int), although the meaning of the cache size (i.e., its unit) is left undefined here.

Since:
7.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Discards any cached data.
    int
    Retrieves the current cache size.
    void
    setCacheSize(int size)
    Sets the cache size to use.

    Methods inherited from interface org.eclipse.jgit.signing.ssh.SigningKeyDatabase

    isAllowed, isRevoked
  • Method Details

    • getCacheSize

      int getCacheSize()
      Retrieves the current cache size.
      Returns:
      the cache size, or -1 if this database has no cache.
    • setCacheSize

      void setCacheSize(int size)
      Sets the cache size to use.
      Parameters:
      size - the cache size, ignored if this database does not have a cache.
      Throws:
      IllegalArgumentException - if size < 0
    • clearCache

      void clearCache()
      Discards any cached data. A no-op if the database has no cache.