private static int parseInt(String parseStr) {

        int parseValue = -1;

        if (parseStr.startsWith(HEX_PREFIX)) {
            parseStr = parseStr.substring(2).trim();
            parseValue = Integer.parseInt(parseStr, 16);
        } else if (parseStr.startsWith(O_PREFIX)) {
            parseStr = parseStr.substring(1).trim();
            parseValue = Integer.parseInt(parseStr, 8);
        } else {
            parseValue = Integer.parseInt(parseStr);
        }

        return parseValue;
    }
Attempts to establish a connection to the database from the XML configurations. If failed,
try use alternative standby database.

@return Database connection
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/AgentDbUtils.java