public KeeperRecord getRecordByHost(String hostname) throws GuacamoleException {
        validateCache();
        cacheLock.readLock().lock();
        try {

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

            return cachedRecordsByHost.get(hostname);

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

@param hostname
    The hostname of the record to return.

@return
    The record associated with the given hostname, 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