Class ExternalPasswordCache

  • All Implemented Interfaces:
    PasswordCache

    public class ExternalPasswordCache
    extends Object
    implements PasswordCache
    External command password cache. Singleton password cache.
    Version:
    $Revision:$
    Author:
    Peter Skopek
    • Method Detail

      • getExternalPasswordCacheInstance

        public static ExternalPasswordCache getExternalPasswordCacheInstance()
      • contains

        public boolean contains​(String key,
                                long timeOut)
        Description copied from interface: PasswordCache
        Checks whether the cache already contains given key. Non zero timeOut will be checked to expire cache entry.
        Specified by:
        contains in interface PasswordCache
        Returns:
      • getPassword

        public char[] getPassword​(String key)
        Description copied from interface: PasswordCache
        Get password from the cache. Returns null if there is no such key in the cache.
        Specified by:
        getPassword in interface PasswordCache
        Returns:
      • getCachedPasswordsCount

        public int getCachedPasswordsCount()
        Get number of cached passwords. Mainly for testing purpose.
      • reset

        public void reset()
        Description copied from interface: PasswordCache
        Reset the cache (clean whole cache and start all over again).
        Specified by:
        reset in interface PasswordCache