private int getIterations(final String username) {
        try {
            return AuthFactory.getIterations(username);
        } catch (UserNotFoundException e) {
            return ITERATION_COUNT.getValue();
        }
    }
Retrieve the iteration count from the database for a given username.
xmppserver/src/main/java/org/jivesoftware/openfire/sasl/ScramSha1SaslServer.java