List of usage examples for org.apache.cassandra.db PartitionRangeReadCommand dataRange
DataRange dataRange
To view the source code for org.apache.cassandra.db PartitionRangeReadCommand dataRange.
Click Source Link
From source file:com.stratio.cassandra.lucene.cache.SearchCacheEntry.java
License:Apache License
SearchCacheEntry(SearchCache searchCache, String search, PartitionRangeReadCommand command, Query query) { this.searchCache = searchCache; this.search = search; this.command = command; this.query = query; startPosition = command.dataRange().startKey(); stopPosition = command.dataRange().stopKey(); startPrefix = KeyMapper.startClusteringPrefix(command.dataRange()); stopPrefix = KeyMapper.stopClusteringPrefix(command.dataRange()); currentPosition = startPosition;//from w ww . ja va 2 s . c o m currentClustering = startPrefix.isPresent() ? Optional.of(new Clustering(startPrefix.get().getRawValues())) : Optional.empty(); scoreDoc = null; }
From source file:com.stratio.cassandra.lucene.cache.SearchCacheEntry.java
License:Apache License
SearchCacheEntry(SearchCache searchCache, String search, PartitionRangeReadCommand command, DecoratedKey decoratedKey, Optional<Clustering> currentClustering, ScoreDoc scoreDoc, Query query) { this.searchCache = searchCache; this.search = search; this.command = command; this.currentPosition = decoratedKey; this.currentClustering = currentClustering; this.scoreDoc = scoreDoc; this.query = query; startPosition = command.dataRange().startKey(); stopPosition = command.dataRange().stopKey(); startPrefix = KeyMapper.startClusteringPrefix(command.dataRange()); stopPrefix = KeyMapper.stopClusteringPrefix(command.dataRange()); }
From source file:com.stratio.cassandra.lucene.cache.SearchCacheEntry.java
License:Apache License
boolean isValid(ClusteringComparator comparator, String search, PartitionRangeReadCommand command) { if (search.equals(this.search)) { DataRange dataRange = command.dataRange(); return validKey(dataRange) && validPrefix(comparator, dataRange); }/* w w w. j a v a 2 s .co m*/ return false; }
From source file:com.stratio.cassandra.lucene.IndexPagingState.java
License:Apache License
private Pair<DecoratedKey, Clustering> forCommand(PartitionRangeReadCommand command) { DataRange dataRange = command.dataRange(); for (Map.Entry<DecoratedKey, Clustering> entry : entries.entrySet()) { DecoratedKey key = entry.getKey(); if (dataRange.contains(key)) { Clustering clustering = entry.getValue(); return Pair.create(key, clustering); }// w ww.ja v a 2 s.c o m } return null; }