List of usage examples for org.apache.cassandra.db ConsistencyLevel validateForRead
public void validateForRead(String keyspaceName) throws InvalidRequestException
From source file:com.stratio.cassandra.lucene.IndexQueryHandler.java
License:Apache License
public ResultMessage.Rows executeWithoutPaging(SelectStatement select, QueryState state, QueryOptions options) throws ReflectiveOperationException { ConsistencyLevel cl = options.getConsistency(); checkNotNull(cl, "Invalid empty consistency level"); cl.validateForRead(select.keyspace()); int nowInSec = FBUtilities.nowInSeconds(); int userLimit = select.getLimit(options); ReadQuery query = select.getQuery(options, nowInSec, userLimit); Method method = select.getClass().getDeclaredMethod("execute", ReadQuery.class, QueryOptions.class, QueryState.class, int.class, int.class); method.setAccessible(true);//from w w w. j ava2s. c o m return (ResultMessage.Rows) method.invoke(select, query, options, state, nowInSec, userLimit); }