default int getIntValue0(String key) { Integer config = getInteger0(key); if (config == null) { return 0; } return config; }
/** * @deprecated for internal usage, we should not use http api to access oauth interface, instead we use unit invocation. */ private static String getOauth20Url(String accessToken) { return "http://" + XianConfig.get("oauth_server_host") + ":" + XianConfig.get("oauth_server_port") + "/oauth2.0/tokens/validate?token=" + accessToken; }
/** * @return default false if not configured. */ default boolean getBoolValue0(String key) { Boolean booleanObject = getBoolean0(key); return booleanObject == null ? false : booleanObject; }
public static int getWritePoolSize() { return XianConfig.getIntValue("db_pool_size"); }
/** * Read configuration from xian config to get the global transaction timeout in milliseconds. * The configuration key is "db_transaction_timeout" * * @return global transaction timeout in milliseconds. */ public static long getTransactionTimeout() { return XianConfig.getLongValue("db_transaction_timeout", 1000 * 60 * 5); }
default long getLongValue0(String key) { Long config = getLong0(key); if (config == null) { return 0; } return config; }
default String[] getStringArray0(String key, String[] defaultIfNull) { String[] config = getStringArray0(key); return config.length == 0 ? defaultIfNull : config; }
public static String getReadUser() { return XianConfig.get("readonly_db_user"); }
protected static int getDBIndex() { return XianConfig.getIntValue("redisDbIndex"); }
/** * Read configuration from xian config to get the global transaction timeout in milliseconds. * The configuration key is "db_transaction_timeout" * * @return global transaction timeout in milliseconds. */ public static long getTransactionTimeout() { return XianConfig.getLongValue("db_transaction_timeout", 1000 * 60 * 5); }
default Integer getInteger0(String key, Integer defaultIfNull) { Integer config = getInteger0(key); return config == null ? defaultIfNull : config; }
default Boolean getBoolean0(String key, Boolean defaultIfNull) { Boolean boolean0 = getBoolean0(key); return boolean0 == null ? defaultIfNull : boolean0; }
default Long getLong0(String key, Long defaultIfNull) { Long config = getLong0(key); return config == null ? defaultIfNull : config; }
public static String getReadUser() { return XianConfig.get("readonly_db_user"); }
public static int getWritePoolSize() { return XianConfig.getIntValue("db_pool_size"); }
public static String getWriteUser() { return XianConfig.get("db_user"); }
public static int getDBIndex() { return XianConfig.getIntValue("redisDbIndex", 0); } }
private static String getPassword() { return XianConfig.get("redisPassword"); }
private static int getDBIndex() { return XianConfig.getIntValue("redisDbIndex", 0); }
public static String getHost() { return XianConfig.get("redis.host"); }