/** return true if @param range intersects any of the given @param ranges */ public boolean intersects(Iterable<Range<T>> ranges) { for (Range<T> range2 : ranges) { if (range2.intersects(this)) return true; } return false; }
/** return true if @param range intersects any of the given @param ranges */ public boolean intersects(Iterable<Range<T>> ranges) { for (Range<T> range2 : ranges) { if (range2.intersects(this)) return true; } return false; }
/** return true if @param range intersects any of the given @param ranges */ public boolean intersects(Iterable<Range<T>> ranges) { for (Range<T> range2 : ranges) { if (range2.intersects(this)) return true; } return false; }
public boolean tokenRangesIntersec(Collection<Range<Token>> shardTokenRanges, Collection<Range<Token>> requestTokenRange) { for(Range<Token> shardRange : shardTokenRanges) { if (shardRange.intersects(requestTokenRange)) return true; } return false; }
/** return true if @param range intersects any of the given @param ranges */ public boolean intersects(Iterable<Range<T>> ranges) { for (Range<T> range2 : ranges) { if (range2.intersects(this)) return true; } return false; }
public boolean intersects(AbstractBounds<T> that) { // implemented for cleanup compaction membership test, so only Range + Bounds are supported for now if (that instanceof Range) return intersects((Range<T>) that); if (that instanceof Bounds) return intersects((Bounds<T>) that); throw new UnsupportedOperationException("Intersection is only supported for Bounds and Range objects; found " + that.getClass()); }
public boolean intersects(AbstractBounds<T> that) { // implemented for cleanup compaction membership test, so only Range + Bounds are supported for now if (that instanceof Range) return intersects((Range<T>) that); if (that instanceof Bounds) return intersects((Bounds<T>) that); throw new UnsupportedOperationException("Intersection is only supported for Bounds and Range objects; found " + that.getClass()); }
private boolean validateNonOverlapping(MerkleTree tree) { for (Range<Token> range : merkleTrees.keySet()) { if (tree.fullRange.intersects(range)) return false; } return true; }
private boolean validateNonOverlapping(MerkleTree tree) { for (Range<Token> range : merkleTrees.keySet()) { if (tree.fullRange.intersects(range)) return false; } return true; }
public boolean intersects(AbstractBounds<T> that) { // implemented for cleanup compaction membership test, so only Range + Bounds are supported for now if (that instanceof Range) return intersects((Range<T>) that); if (that instanceof Bounds) return intersects((Bounds<T>) that); throw new UnsupportedOperationException("Intersection is only supported for Bounds and Range objects; found " + that.getClass()); }
public boolean intersects(AbstractBounds<T> that) { // implemented for cleanup compaction membership test, so only Range + Bounds are supported for now if (that instanceof Range) return intersects((Range<T>) that); if (that instanceof Bounds) return intersects((Bounds<T>) that); throw new UnsupportedOperationException("Intersection is only supported for Bounds and Range objects; found " + that.getClass()); }
private boolean validateNonOverlapping(MerkleTree tree) { for (Range<Token> range : merkleTrees.keySet()) { if (tree.fullRange.intersects(range)) return false; } return true; }
private boolean validateNonOverlapping(MerkleTree tree) { for (Range<Token> range : merkleTrees.keySet()) { if (tree.fullRange.intersects(range)) return false; } return true; }
public boolean intersects(AbstractBounds<T> that) { // implemented for cleanup compaction membership test, so only Range + Bounds are supported for now if (that instanceof Range) return intersects((Range<T>) that); if (that instanceof Bounds) return intersects((Bounds<T>) that); throw new UnsupportedOperationException("Intersection is only supported for Bounds and Range objects; found " + that.getClass()); }
private boolean intersects(Range<Token> filterRange, boolean isSingleToken, boolean isFullRange, Range<Token> range) { boolean intersects; if (isFullRange) intersects = true; else if (isSingleToken) intersects = range.contains(filterRange.left); else { intersects = range.intersects(filterRange); } return intersects; }
/** * @param that range to check for intersection * @return true if the given range intersects with this range. */ public boolean intersects(Bounds<T> that) { // Same punishment than in Bounds.contains(), we must be carefull if that.left == that.right as // as new Range<T>(that.left, that.right) will then cover the full ring which is not what we // want. return contains(that.left) || (!that.left.equals(that.right) && intersects(new Range<T>(that.left, that.right))); }
/** * @param that range to check for intersection * @return true if the given range intersects with this range. */ public boolean intersects(Bounds<T> that) { // Same punishment than in Bounds.contains(), we must be carefull if that.left == that.right as // as new Range<T>(that.left, that.right) will then cover the full ring which is not what we // want. return contains(that.left) || (!that.left.equals(that.right) && intersects(new Range<T>(that.left, that.right))); }
/** * @param that range to check for intersection * @return true if the given range intersects with this range. */ public boolean intersects(Bounds<T> that) { // Same punishment than in Bounds.contains(), we must be carefull if that.left == that.right as // as new Range<T>(that.left, that.right) will then cover the full ring which is not what we // want. return contains(that.left) || (!that.left.equals(that.right) && intersects(new Range<T>(that.left, that.right))); }
/** * @param that range to check for intersection * @return true if the given range intersects with this range. */ public boolean intersects(Bounds<T> that) { // Same punishment than in Bounds.contains(), we must be carefull if that.left == that.right as // as new Range<T>(that.left, that.right) will then cover the full ring which is not what we // want. return contains(that.left) || (!that.left.equals(that.right) && intersects(new Range<T>(that.left, that.right))); }
public static List<SSTableReader> intersecting(Collection<SSTableReader> sstables, Range<Token> range) { ArrayList<SSTableReader> filtered = new ArrayList<SSTableReader>(); for (SSTableReader sstable : sstables) { Range<Token> sstableRange = new Range<Token>(sstable.first.getToken(), sstable.last.getToken(), sstable.partitioner); if (range == null || sstableRange.intersects(range)) filtered.add(sstable); } return filtered; }