/** * Get one info value by name from the specified database server node. * * @param conn socket connection to server node * @param name name of value to retrieve * @return info value */ public static String request(Connection conn, String name) throws AerospikeException { Info info = new Info(conn, name); return info.parseSingleResponse(name); }
/** * Get many info values by name from the specified database server node. * * @param conn socket connection to server node * @param names names of values to retrieve * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn, String... names) throws AerospikeException { Info info = new Info(conn, names); return info.parseMultiResponse(); }
@Override protected final boolean parseResult() { Info info = new Info(dataBuffer, receiveSize); map = info.parseMultiResponse(); return true; }
@Override protected final boolean parseResult() { Info info = new Info(dataBuffer, receiveSize); map = info.parseMultiResponse(); return true; }
/** * Get one info value by name from the specified database server node. * * @param conn socket connection to server node * @param name name of value to retrieve * @return info value */ public static String request(Connection conn, String name) throws AerospikeException { Info info = new Info(conn, name); return info.parseSingleResponse(name); }
/** * Get all the default info from the specified database server node. * * @param conn socket connection to server node * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn) throws AerospikeException { Info info = new Info(conn); return info.parseMultiResponse(); }
/** * Get many info values by name from the specified database server node. * * @param conn socket connection to server node * @param names names of values to retrieve * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn, List<String> names) throws AerospikeException { Info info = new Info(conn, names); return info.parseMultiResponse(); }
/** * Get many info values by name from the specified database server node. * * @param conn socket connection to server node * @param names names of values to retrieve * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn, String... names) throws AerospikeException { Info info = new Info(conn, names); return info.parseMultiResponse(); }
/** * Get many info values by name from the specified database server node. * * @param conn socket connection to server node * @param names names of values to retrieve * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn, List<String> names) throws AerospikeException { Info info = new Info(conn, names); return info.parseMultiResponse(); }
/** * Get all the default info from the specified database server node. * * @param conn socket connection to server node * @return info name/value pairs */ public static HashMap<String,String> request(Connection conn) throws AerospikeException { Info info = new Info(conn); return info.parseMultiResponse(); }
public RackParser(Connection conn, Node node) { // Send format: rebalance-generation\nrack-ids\n this.racks = new HashMap<String,Integer>(); Info info = new Info(conn, RebalanceGeneration, RackIds); this.length = info.length; if (length == 0) { throw new AerospikeException.Parse("rack-ids response is empty"); } this.buffer = info.buffer; // Create reusable StringBuilder for performance. this.sb = new StringBuilder(32); // Max namespace length generation = parseGeneration(); parseRacks(node); }
public RackParser(Connection conn, Node node) { // Send format: rebalance-generation\nrack-ids\n this.racks = new HashMap<String,Integer>(); Info info = new Info(conn, RebalanceGeneration, RackIds); this.length = info.length; if (length == 0) { throw new AerospikeException.Parse("rack-ids response is empty"); } this.buffer = info.buffer; // Create reusable StringBuilder for performance. this.sb = new StringBuilder(32); // Max namespace length generation = parseGeneration(); parseRacks(node); }
public PartitionParser(Connection conn, Node node, HashMap<String,Partitions> map, int partitionCount) { // Send format 1: partition-generation\nreplicas\n // Send format 2: partition-generation\nreplicas-all\n // Send format 3: partition-generation\nreplicas-master\n this.partitionCount = partitionCount; this.map = map; String command; if (node.hasReplicas()) { command = Replicas; } else { command = ReplicasAll; } Info info = new Info(conn, PartitionGeneration, command); this.length = info.length; if (length == 0) { throw new AerospikeException.Parse("Partition info is empty"); } this.buffer = info.buffer; // Create reusable StringBuilder for performance. this.sb = new StringBuilder(32); // Max namespace length generation = parseGeneration(); parseReplicasAll(node, command); }
Info info = new Info(conn, command); NameValueParser parser = info.getNameValueParser(); String error = null;
Info info = new Info(conn, command); NameValueParser parser = info.getNameValueParser(); String error = null;
public PartitionParser(Connection conn, Node node, HashMap<String,Partitions> map, int partitionCount) { // Send format 1: partition-generation\nreplicas\n // Send format 2: partition-generation\nreplicas-all\n // Send format 3: partition-generation\nreplicas-master\n this.partitionCount = partitionCount; this.map = map; String command; if (node.hasReplicas()) { command = Replicas; } else { command = ReplicasAll; } Info info = new Info(conn, PartitionGeneration, command); this.length = info.length; if (length == 0) { throw new AerospikeException.Parse("Partition info is empty"); } this.buffer = info.buffer; // Create reusable StringBuilder for performance. this.sb = new StringBuilder(32); // Max namespace length generation = parseGeneration(); parseReplicasAll(node, command); }
private String sendInfoCommand(Policy policy, String command) { Node node = cluster.getRandomNode(); Connection conn = node.getConnection(policy.socketTimeout); Info info; try { info = new Info(conn, command); node.putConnection(conn); } catch (RuntimeException re) { node.closeConnection(conn); throw re; } return info.getValue(); }
private String sendInfoCommand(Policy policy, String command) { Node node = cluster.getRandomNode(); Connection conn = node.getConnection(policy.socketTimeout); Info info; try { info = new Info(conn, command); node.putConnection(conn); } catch (RuntimeException re) { node.closeConnection(conn); throw re; } return info.getValue(); }
cluster.useServicesAlternate ? "peers-clear-alt" : "peers-clear-std"; parser = new Info(conn, command);
cluster.useServicesAlternate ? "peers-clear-alt" : "peers-clear-std"; parser = new Info(conn, command);