Package com.aerospike.client
Class Info
java.lang.Object
com.aerospike.client.Info
Access server's info monitoring protocol.
The info protocol is a name/value pair based system, where an individual database server node is queried to determine its configuration and status. The list of supported names can be found at:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInfo command error response.classParser for responses in name/value pair format: -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInfo(byte[] buffer, int length) Internal constructor.Info(com.aerospike.client.cluster.Connection conn) Send default empty command to server and store results.Send single command to server and store results.Send multiple commands to server and store results.Send multiple commands to server and store results. -
Method Summary
Modifier and TypeMethodDescriptionvoidexpect(char expected) Parse response in name/value pair format:getValue()Return single value from response buffer.intparseInt()Convert UTF8 numeric digits to an integer.voidParse request name, verify the name is expected and check for error message.static intparseResultCode(String response) Parse info response string and return the result code for info commands that only return OK or an error string.parseString(char stop) parseString(char stop1, char stop2, char stop3) request(com.aerospike.client.cluster.Connection conn) Get all the default info from the specified database server node.static StringGet one info value by name from the specified database server node.Get many info values by name from the specified database server node.Get many info values by name from the specified database server node.static StringGet one info value by name from the specified database server node.request(InfoPolicy policy, Node node) Get default info values from the specified database server node.static Stringrequest(InfoPolicy policy, Node node, String name) Get one info value by name from the specified database server node.request(InfoPolicy policy, Node node, String... names) Get many info values by name from the specified database server node.Get default info from the specified database server node, using host name and port.static StringGet one info value by name from the specified database server node, using host name and port.Get many info values by name from the specified database server node, using host name and port.request(InetSocketAddress socketAddress) Get all the default info from the specified database server node.static Stringrequest(InetSocketAddress socketAddress, String name) Get one info value by name from the specified database server node.request(InetSocketAddress socketAddress, String... names) Get many info values by name from the specified database server node.voidskipDelimiter(char stop) Find next delimeter and skip over it.void
-
Field Details
-
buffer
public byte[] buffer -
length
public int length -
offset
public int offset
-
-
Constructor Details
-
Info
Send single command to server and store results. This constructor is used internally. The static request methods should be used instead.- Parameters:
conn- connection to server nodecommand- command sent to server- Throws:
AerospikeException
-
Info
public Info(com.aerospike.client.cluster.Connection conn, String... commands) throws AerospikeException Send multiple commands to server and store results. This constructor is used internally. The static request methods should be used instead.- Parameters:
conn- connection to server nodecommands- commands sent to server- Throws:
AerospikeException
-
Info
public Info(com.aerospike.client.cluster.Connection conn, List<String> commands) throws AerospikeException Send multiple commands to server and store results. This constructor is used internally. The static request methods should be used instead.- Parameters:
conn- connection to server nodecommands- commands sent to server- Throws:
AerospikeException
-
Info
Send default empty command to server and store results. This constructor is used internally. The static request methods should be used instead.- Parameters:
conn- connection to server node- Throws:
AerospikeException
-
Info
public Info(byte[] buffer, int length) Internal constructor. Do not use.
-
-
Method Details
-
request
Get one info value by name from the specified database server node. This method supports user authentication.- Parameters:
node- server nodename- name of variable to retrieve- Throws:
AerospikeException
-
request
Get one info value by name from the specified database server node. This method supports user authentication.- Parameters:
policy- info command configuration parameters, pass in null for defaultsnode- server nodename- name of variable to retrieve- Throws:
AerospikeException
-
request
public static Map<String,String> request(InfoPolicy policy, Node node, String... names) throws AerospikeException Get many info values by name from the specified database server node. This method supports user authentication.- Parameters:
policy- info command configuration parameters, pass in null for defaultsnode- server nodenames- names of variables to retrieve- Throws:
AerospikeException
-
request
Get default info values from the specified database server node. This method supports user authentication.- Parameters:
policy- info command configuration parameters, pass in null for defaultsnode- server node- Throws:
AerospikeException
-
request
Get one info value by name from the specified database server node, using host name and port. This method does not support user authentication.- Parameters:
hostname- host nameport- host portname- name of value to retrieve- Returns:
- info value
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(String hostname, int port, String... names) throws AerospikeException Get many info values by name from the specified database server node, using host name and port. This method does not support user authentication.- Parameters:
hostname- host nameport- host portnames- names of values to retrieve- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
Get default info from the specified database server node, using host name and port. This method does not support user authentication.- Parameters:
hostname- host nameport- host port- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
public static String request(InetSocketAddress socketAddress, String name) throws AerospikeException Get one info value by name from the specified database server node. This method does not support TLS connections nor user authentication.- Parameters:
socketAddress-InetSocketAddressof server nodename- name of value to retrieve- Returns:
- info value
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(InetSocketAddress socketAddress, String... names) throws AerospikeException Get many info values by name from the specified database server node. This method does not support TLS connections nor user authentication.- Parameters:
socketAddress-InetSocketAddressof server nodenames- names of values to retrieve- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(InetSocketAddress socketAddress) throws AerospikeException Get all the default info from the specified database server node. This method does not support TLS connections nor user authentication.- Parameters:
socketAddress-InetSocketAddressof server node- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
public static String request(com.aerospike.client.cluster.Connection conn, String name) throws AerospikeException Get one info value by name from the specified database server node.- Parameters:
conn- socket connection to server nodename- name of value to retrieve- Returns:
- info value
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn, String... names) throws AerospikeException Get many info values by name from the specified database server node.- Parameters:
conn- socket connection to server nodenames- names of values to retrieve- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn, List<String> names) throws AerospikeException Get many info values by name from the specified database server node.- Parameters:
conn- socket connection to server nodenames- names of values to retrieve- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
request
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn) throws AerospikeException Get all the default info from the specified database server node.- Parameters:
conn- socket connection to server node- Returns:
- info name/value pairs
- Throws:
AerospikeException
-
parseResultCode
Parse info response string and return the result code for info commands that only return OK or an error string. Info commands that return other data are not handled by this method. -
parseMultiResponse
- Throws:
AerospikeException
-
parseName
Parse request name, verify the name is expected and check for error message. -
getValue
Return single value from response buffer. -
getNameValueParser
Parse response in name/value pair format:<command>\t<name1>=<value1>;<name2>=<value2>;...\n- Returns:
- parser for name/value pairs
-
skipToValue
public void skipToValue() -
skipDelimiter
public void skipDelimiter(char stop) Find next delimeter and skip over it. -
parseInt
public int parseInt()Convert UTF8 numeric digits to an integer. Negative integers are not supported. Input format: 1234 -
parseString
-
parseString
-
expect
public void expect(char expected) -
getTruncatedResponse
-