Example usage for org.apache.cassandra.dht Range isInRanges

List of usage examples for org.apache.cassandra.dht Range isInRanges

Introduction

In this page you can find the example usage for org.apache.cassandra.dht Range isInRanges.

Prototype

public static <T extends RingPosition<T>> boolean isInRanges(T token, Iterable<Range<T>> ranges) 

Source Link

Usage

From source file:com.jeffjirsa.cassandra.db.compaction.writers.CleaningTimeWindowCompactionWriter.java

License:Apache License

@Override
public boolean realAppend(UnfilteredRowIterator partition) {
    if (Range.isInRanges(partition.partitionKey().getToken(), sortedRanges)) {
        RowIndexEntry rie = sstableWriter.append(partition);
        return rie != null;
    } else {/* w ww  .  j a va  2s  .  c  om*/
        cfs.invalidateCachedPartition(partition.partitionKey());
        cfs.indexManager.deletePartition(partition, nowInSec);
        return false;
    }
}