public class Qconf extends Object
| Constructor and Description |
|---|
Qconf() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayList<String> |
getAllHost(String key)
get all the hosts available from Qconf by the key in current server room
it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static ArrayList<String> |
getAllHost(String key,
String idc)
get all the hosts available from Qconf by the key and idc
it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static Map<String,String> |
getBatchConf(String key)
get all children conf with its value
|
static Map<String,String> |
getBatchConf(String key,
String idc)
get all children conf with its value
|
static ArrayList<String> |
getBatchKeys(String key)
get all children keys
|
static ArrayList<String> |
getBatchKeys(String key,
String idc)
get all children conf keys
|
static String |
getConf(String key)
get value configure from Qconf by the key in current server room
it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static String |
getConf(String key,
String idc)
get value configure from Qconf by the key and idc
it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static String |
getHost(String key)
get one host configure available from Qconf by the key in current server room
it will pick one randomly if multi-host available it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static String |
getHost(String key,
String idc)
get one host configure available from Qconf by the key and idc
it will pick one randomly if multi-host available it will wait for a while if the qconf-agent not get the configure yet, at most 100 * 5 millisecond |
static String |
version()
get qconf java driver version
|
public static String version()
public static String getConf(String key, String idc) throws QconfException
key - the key indicate one configure itemidc - server room name, use 'null' if get configure from the one of current client machineQconfException - if any exception of qconf happend during the operationpublic static String getConf(String key) throws QconfException
key - the key indicate one configure itemQconfException - if any exception of qconf happend during the operationpublic static String getHost(String key, String idc) throws QconfException
key - the key indicate one configure itemidc - server room name, use 'null' if get configure from the one of current client machineQconfException - if any exception of qconf happend during the operationpublic static String getHost(String key) throws QconfException
key - the key indicate one configure itemQconfException - if any exception of qconf happend during the operationpublic static ArrayList<String> getAllHost(String key, String idc) throws QconfException
key - the key indicate one configure itemidc - server room name, use 'null' if get configure from the one of current client machineQconfException - if any exception of qconf happend during the operationpublic static ArrayList<String> getAllHost(String key) throws QconfException
key - the key indicate one configure itemQconfException - if any exception of qconf happend during the operationpublic static Map<String,String> getBatchConf(String key, String idc) throws QconfException
key - the key indicate one configure itemidc - server room nameQconfException - if any exception of qconf happend during the operationpublic static Map<String,String> getBatchConf(String key) throws QconfException
key - the key indicate one configure itemQconfException - if any exception of qconf happend during the operationpublic static ArrayList<String> getBatchKeys(String key, String idc) throws QconfException
key - the key indicate one configure itemidc - server room nameQconfException - if any exception of qconf happend during the operationpublic static ArrayList<String> getBatchKeys(String key) throws QconfException
key - the key indicate one configure itemQconfException - if any exception of qconf happend during the operationCopyright © 2015. All rights reserved.