Example usage for org.apache.cassandra.cql3 QueryOptions getValues

List of usage examples for org.apache.cassandra.cql3 QueryOptions getValues

Introduction

In this page you can find the example usage for org.apache.cassandra.cql3 QueryOptions getValues.

Prototype

public abstract List<ByteBuffer> getValues();

Source Link

Usage

From source file:com.stratio.cassandra.lucene.IndexQueryHandler.java

License:Apache License

@Override
/** {@inheritDoc} */
public ResultMessage process(String query, QueryState state, QueryOptions options,
        Map<String, ByteBuffer> customPayload) {
    ParsedStatement.Prepared p = QueryProcessor.getStatement(query, state.getClientState());
    options.prepare(p.boundNames);/* ww  w .  j a  v  a2s  .  com*/
    CQLStatement prepared = p.statement;
    if (prepared.getBoundTerms() != options.getValues().size()) {
        throw new InvalidRequestException("Invalid amount of bind variables");
    }

    if (!state.getClientState().isInternal) {
        QueryProcessor.metrics.regularStatementsExecuted.inc();
    }

    return processStatement(prepared, state, options);
}