public class Info extends Object
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:
Modifier and Type | Class and Description |
---|---|
class |
Info.NameValueParser
Parser for responses in name/value pair format:
|
Modifier and Type | Field and Description |
---|---|
byte[] |
buffer |
int |
length |
int |
offset |
StringBuilder |
sb |
Constructor and Description |
---|
Info(byte[] buffer,
int length)
Internal constructor.
|
Info(com.aerospike.client.cluster.Connection conn)
Send default empty command to server and store results.
|
Info(com.aerospike.client.cluster.Connection conn,
List<String> commands)
Send multiple commands to server and store results.
|
Info(com.aerospike.client.cluster.Connection conn,
String... commands)
Send multiple commands to server and store results.
|
Info(com.aerospike.client.cluster.Connection conn,
String command)
Send single command to server and store results.
|
Modifier and Type | Method and Description |
---|---|
void |
expect(char expected) |
Info.NameValueParser |
getNameValueParser()
Parse response in name/value pair format:
|
String |
getTruncatedResponse() |
String |
getValue()
Return single value from response buffer.
|
int |
parseInt()
Convert UTF8 numeric digits to an integer.
|
HashMap<String,String> |
parseMultiResponse() |
void |
parseName(String name)
Parse request name, verify the name is expected and check for error message.
|
String |
parseString(char stop) |
String |
parseString(char stop1,
char stop2,
char stop3) |
static HashMap<String,String> |
request(com.aerospike.client.cluster.Connection conn)
Get all the default info from the specified database server node.
|
static HashMap<String,String> |
request(com.aerospike.client.cluster.Connection conn,
List<String> names)
Get many info values by name from the specified database server node.
|
static HashMap<String,String> |
request(com.aerospike.client.cluster.Connection conn,
String... names)
Get many info values by name from the specified database server node.
|
static String |
request(com.aerospike.client.cluster.Connection conn,
String name)
Get one info value by name from the specified database server node.
|
static HashMap<String,String> |
request(InetSocketAddress socketAddress)
Get all the default info from the specified database server node.
|
static HashMap<String,String> |
request(InetSocketAddress socketAddress,
String... names)
Get many info values by name from the specified database server node.
|
static String |
request(InetSocketAddress socketAddress,
String name)
Get one info value by name from the specified database server node.
|
static Map<String,String> |
request(InfoPolicy policy,
Node node)
Get default info values from the specified database server node.
|
static Map<String,String> |
request(InfoPolicy policy,
Node node,
String... names)
Get many info values by name from the specified database server node.
|
static String |
request(InfoPolicy policy,
Node node,
String name)
Get one info value by name from the specified database server node.
|
static String |
request(Node node,
String name)
Get one info value by name from the specified database server node.
|
static HashMap<String,String> |
request(String hostname,
int port)
Get default info from the specified database server node, using host name and port.
|
static HashMap<String,String> |
request(String hostname,
int port,
String... names)
Get many info values by name from the specified database server node,
using host name and port.
|
static String |
request(String hostname,
int port,
String name)
Get one info value by name from the specified database server node, using
host name and port.
|
void |
skipDelimiter(char stop)
Find next delimeter and skip over it.
|
void |
skipToValue() |
public byte[] buffer
public int length
public int offset
public StringBuilder sb
public Info(com.aerospike.client.cluster.Connection conn, String command) throws AerospikeException
conn
- connection to server nodecommand
- command sent to serverAerospikeException
public Info(com.aerospike.client.cluster.Connection conn, String... commands) throws AerospikeException
conn
- connection to server nodecommands
- commands sent to serverAerospikeException
public Info(com.aerospike.client.cluster.Connection conn, List<String> commands) throws AerospikeException
conn
- connection to server nodecommands
- commands sent to serverAerospikeException
public Info(com.aerospike.client.cluster.Connection conn) throws AerospikeException
conn
- connection to server nodeAerospikeException
public Info(byte[] buffer, int length)
public static String request(Node node, String name) throws AerospikeException
node
- server nodename
- name of variable to retrieveAerospikeException
public static String request(InfoPolicy policy, Node node, String name) throws AerospikeException
policy
- info command configuration parameters, pass in null for defaultsnode
- server nodename
- name of variable to retrieveAerospikeException
public static Map<String,String> request(InfoPolicy policy, Node node, String... names) throws AerospikeException
policy
- info command configuration parameters, pass in null for defaultsnode
- server nodenames
- names of variables to retrieveAerospikeException
public static Map<String,String> request(InfoPolicy policy, Node node) throws AerospikeException
policy
- info command configuration parameters, pass in null for defaultsnode
- server nodeAerospikeException
public static String request(String hostname, int port, String name) throws AerospikeException
hostname
- host nameport
- host portname
- name of value to retrieveAerospikeException
public static HashMap<String,String> request(String hostname, int port, String... names) throws AerospikeException
hostname
- host nameport
- host portnames
- names of values to retrieveAerospikeException
public static HashMap<String,String> request(String hostname, int port) throws AerospikeException
hostname
- host nameport
- host portAerospikeException
public static String request(InetSocketAddress socketAddress, String name) throws AerospikeException
socketAddress
- InetSocketAddress
of server nodename
- name of value to retrieveAerospikeException
public static HashMap<String,String> request(InetSocketAddress socketAddress, String... names) throws AerospikeException
socketAddress
- InetSocketAddress
of server nodenames
- names of values to retrieveAerospikeException
public static HashMap<String,String> request(InetSocketAddress socketAddress) throws AerospikeException
socketAddress
- InetSocketAddress
of server nodeAerospikeException
public static String request(com.aerospike.client.cluster.Connection conn, String name) throws AerospikeException
conn
- socket connection to server nodename
- name of value to retrieveAerospikeException
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn, String... names) throws AerospikeException
conn
- socket connection to server nodenames
- names of values to retrieveAerospikeException
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn, List<String> names) throws AerospikeException
conn
- socket connection to server nodenames
- names of values to retrieveAerospikeException
public static HashMap<String,String> request(com.aerospike.client.cluster.Connection conn) throws AerospikeException
conn
- socket connection to server nodeAerospikeException
public HashMap<String,String> parseMultiResponse() throws AerospikeException
AerospikeException
public void parseName(String name)
public String getValue()
public Info.NameValueParser getNameValueParser()
<command>\t<name1>=<value1>;<name2>=<value2>;...\n
public void skipToValue()
public void skipDelimiter(char stop)
public int parseInt()
public String parseString(char stop)
public String parseString(char stop1, char stop2, char stop3)
public void expect(char expected)
public String getTruncatedResponse()
Copyright © 2012–2023 Aerospike, Inc. All rights reserved.