List of usage examples for org.apache.cassandra.utils FBUtilities nowInSeconds
public static int nowInSeconds()
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);/* w w w. j a v a 2s . c o m*/ return (ResultMessage.Rows) method.invoke(select, query, options, state, nowInSec, userLimit); }
From source file:io.jmnarloch.cassandra.kafka.utils.CassandraUtils.java
License:Apache License
public static RowIterator rowIterator(UnfilteredRowIterator iterator) { return UnfilteredRowIterators.filter(iterator, FBUtilities.nowInSeconds()); }