/** * Send default empty command to server and store results. * This constructor is used internally. * The static request methods should be used instead. * * @param conn connection to server node */ public Info(Connection conn) throws AerospikeException { buffer = ThreadLocalData.getBuffer(); offset = 8; // Skip size field. sendCommand(conn); }
/** * Send default empty command to server and store results. * This constructor is used internally. * The static request methods should be used instead. * * @param conn connection to server node */ public Info(Connection conn) throws AerospikeException { buffer = ThreadLocalData.getBuffer(); offset = 8; // Skip size field. sendCommand(conn); }
/** * Send single command to server and store results. * This constructor is used internally. * The static request methods should be used instead. * * @param conn connection to server node * @param command command sent to server */ public Info(Connection conn, String command) throws AerospikeException { buffer = ThreadLocalData.getBuffer(); // If conservative estimate may be exceeded, get exact estimate // to preserve memory and resize buffer. if ((command.length() * 2 + 9) > buffer.length) { offset = Buffer.estimateSizeUtf8(command) + 9; resizeBuffer(offset); } offset = 8; // Skip size field. // The command format is: <name1>\n<name2>\n... offset += Buffer.stringToUtf8(command, buffer, offset); buffer[offset++] = '\n'; sendCommand(conn); }
/** * Send single command to server and store results. * This constructor is used internally. * The static request methods should be used instead. * * @param conn connection to server node * @param command command sent to server */ public Info(Connection conn, String command) throws AerospikeException { buffer = ThreadLocalData.getBuffer(); // If conservative estimate may be exceeded, get exact estimate // to preserve memory and resize buffer. if ((command.length() * 2 + 9) > buffer.length) { offset = Buffer.estimateSizeUtf8(command) + 9; resizeBuffer(offset); } offset = 8; // Skip size field. // The command format is: <name1>\n<name2>\n... offset += Buffer.stringToUtf8(command, buffer, offset); buffer[offset++] = '\n'; sendCommand(conn); }
buffer[offset++] = '\n'; sendCommand(conn);
buffer[offset++] = '\n'; sendCommand(conn);
buffer[offset++] = '\n'; sendCommand(conn);
buffer[offset++] = '\n'; sendCommand(conn);