public QueryRecordExecutor(Cluster cluster, QueryPolicy policy, Statement statement, Node node) throws AerospikeException { super(cluster, policy, statement, node); this.recordSet = new RecordSet(this, policy.recordQueueSize); statement.prepare(true); initializeThreads(); }
public QueryRecordExecutor(Cluster cluster, QueryPolicy policy, Statement statement, Node node) throws AerospikeException { super(cluster, policy, statement, node); this.recordSet = new RecordSet(this, policy.recordQueueSize); statement.prepare(true); initializeThreads(); }
/** * Execute query, apply statement's aggregation function, and return result iterator. * The aggregation function should be initialized via the statement's setAggregateFunction() * and should be located in a resource or a filesystem file. * <p> * The query executor puts results on a queue in separate threads. The calling thread * concurrently pops results off the queue through the ResultSet iterator. * The aggregation function is called on both server and client (final reduce). * Therefore, the Lua script file must also reside on both server and client. * * @param policy generic configuration parameters, pass in null for defaults * @param statement database query command * @throws AerospikeException if query fails */ public final ResultSet queryAggregate(QueryPolicy policy, Statement statement) throws AerospikeException { if (policy == null) { policy = queryPolicyDefault; } statement.prepare(true); QueryAggregateExecutor executor = new QueryAggregateExecutor(cluster, policy, statement, null); return executor.getResultSet(); }
/** * Execute query, apply statement's aggregation function, and return result iterator. * The aggregation function should be initialized via the statement's setAggregateFunction() * and should be located in a resource or a filesystem file. * <p> * The query executor puts results on a queue in separate threads. The calling thread * concurrently pops results off the queue through the ResultSet iterator. * The aggregation function is called on both server and client (final reduce). * Therefore, the Lua script file must also reside on both server and client. * * @param policy generic configuration parameters, pass in null for defaults * @param statement database query command * @throws AerospikeException if query fails */ public final ResultSet queryAggregate(QueryPolicy policy, Statement statement) throws AerospikeException { if (policy == null) { policy = queryPolicyDefault; } statement.prepare(true); QueryAggregateExecutor executor = new QueryAggregateExecutor(cluster, policy, statement, null); return executor.getResultSet(); }
Statement st = tmsDB.createStatement( "SELECT * FROM ObjectTexts WHERE programID=? AND objName = ?"); st.prepare(); st.bind(1, JasonProgramID); st.bind(2, JsonobjName); Cursor c = st.getCursor(); ...
/** * Execute query on a single server node, apply statement's aggregation function, and return * result iterator. * The aggregation function should be initialized via the statement's setAggregateFunction() * and should be located in a resource or a filesystem file. * <p> * The query executor puts results on a queue in separate threads. The calling thread * concurrently pops results off the queue through the ResultSet iterator. * The aggregation function is called on both server and client (final reduce). * Therefore, the Lua script file must also reside on both server and client. * * @param policy generic configuration parameters, pass in null for defaults * @param statement database query command * @param node server node to execute query * @throws AerospikeException if query fails */ public final ResultSet queryAggregateNode(QueryPolicy policy, Statement statement, Node node) throws AerospikeException { if (policy == null) { policy = queryPolicyDefault; } statement.prepare(true); QueryAggregateExecutor executor = new QueryAggregateExecutor(cluster, policy, statement, node); return executor.getResultSet(); }
/** * Execute query on a single server node, apply statement's aggregation function, and return * result iterator. * The aggregation function should be initialized via the statement's setAggregateFunction() * and should be located in a resource or a filesystem file. * <p> * The query executor puts results on a queue in separate threads. The calling thread * concurrently pops results off the queue through the ResultSet iterator. * The aggregation function is called on both server and client (final reduce). * Therefore, the Lua script file must also reside on both server and client. * * @param policy generic configuration parameters, pass in null for defaults * @param statement database query command * @param node server node to execute query * @throws AerospikeException if query fails */ public final ResultSet queryAggregateNode(QueryPolicy policy, Statement statement, Node node) throws AerospikeException { if (policy == null) { policy = queryPolicyDefault; } statement.prepare(true); QueryAggregateExecutor executor = new QueryAggregateExecutor(cluster, policy, statement, node); return executor.getResultSet(); }
super(eventLoop, cluster); this.listener = listener; statement.prepare(true);
super(eventLoop, cluster); this.listener = listener; statement.prepare(true);
statement.prepare(false);
statement.prepare(false);