@Override
  public Set<String> listCredentials() throws AmbariException {
    Lock lock = getLock();
    lock.lock();
    try {
      return new HashSet<>(cache.asMap().keySet());
    } finally {
      lock.unlock();
    }
  }
Returns a list of the alias names for the credentials stored in the CredentialStore
<p/>
This implementation is thread-safe, allowing one thread at a time to access the credential store.

@return a Set of Strings representing alias names for the credentials stored in the CredentialStore
@throws AmbariException if an error occurs while searching forthe credential
ambari-server/src/main/java/org/apache/ambari/server/security/encryption/InMemoryCredentialStore.java