public KeeperRecord getRecordByDomain(String domain) throws GuacamoleException {
        validateCache();
        cacheLock.readLock().lock();
        try {

            if (cachedAmbiguousDomains.contains(domain)) {
                logger.debug("The domain \"{}\" is referenced by multiple "
                        + "Keeper records and cannot be used to locate "
                        + "individual secrets.", domain);
                return null;
            }

            return cachedRecordsByDomain.get(domain);

        }
        finally {
            cacheLock.readLock().unlock();
        }
    }
Returns the record associated with the given domain. If no such record
exists, or there are multiple such records, null is returned.

@param domain
    The domain of the record to return.

@return
    The record associated with the given domain, or null if there is
    no such record or multiple such records.

@throws GuacamoleException
    If an error occurs that prevents the record from being retrieved.
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java