public RangeTombstone search(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : rangeTombstone(idx); }
/** * Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), * or null if {@code name} is not covered by any tombstone. */ public DeletionTime searchDeletionTime(Composite name) { int idx = searchInternal(name, 0); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
/** * Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), * or null if {@code name} is not covered by any tombstone. */ public DeletionTime searchDeletionTime(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
public RangeTombstone search(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : rangeTombstone(idx); }
/** * Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), * or null if {@code name} is not covered by any tombstone. */ public DeletionTime searchDeletionTime(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
public RangeTombstone search(Composite name) { int idx = searchInternal(name, 0); return idx < 0 ? null : rangeTombstone(idx); }
/** * Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), * or null if {@code name} is not covered by any tombstone. */ public DeletionTime searchDeletionTime(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
/** * Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), * or null if {@code name} is not covered by any tombstone. */ public DeletionTime searchDeletionTime(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
public RangeTombstone search(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : rangeTombstone(idx); }
public RangeTombstone search(Clustering name) { int idx = searchInternal(name, 0, size); return idx < 0 ? null : rangeTombstone(idx); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Cell cell) { int idx = searchInternal(cell.name(), 0); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell instanceof CounterCell || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
public Iterator<RangeTombstone> iterator(Composite from, Composite till) { int startIdx = from.isEmpty() ? 0 : searchInternal(from, 0); final int start = startIdx < 0 ? -startIdx-1 : startIdx; if (start >= size) return Iterators.<RangeTombstone>emptyIterator(); int finishIdx = till.isEmpty() ? size : searchInternal(till, start); // if stopIdx is the first range after 'till' we care only until the previous range final int finish = finishIdx < 0 ? -finishIdx-2 : finishIdx; // Note: the following is true because we know 'from' is before 'till' in sorted order. if (start > finish) return Iterators.<RangeTombstone>emptyIterator(); else if (start == finish) return Iterators.<RangeTombstone>singletonIterator(rangeTombstone(start)); return new AbstractIterator<RangeTombstone>() { private int idx = start; protected RangeTombstone computeNext() { if (idx >= size || idx > finish) return endOfData(); return rangeTombstone(idx++); } }; }
private Iterator<RangeTombstone> forwardIterator(final Slice slice) int startIdx = slice.start() == ClusteringBound.BOTTOM ? 0 : searchInternal(slice.start(), 0, size); final int start = startIdx < 0 ? -startIdx-1 : startIdx; return Collections.emptyIterator(); int finishIdx = slice.end() == ClusteringBound.TOP ? size - 1 : searchInternal(slice.end(), start, size);
private Iterator<RangeTombstone> forwardIterator(final Slice slice) int startIdx = slice.start() == ClusteringBound.BOTTOM ? 0 : searchInternal(slice.start(), 0, size); final int start = startIdx < 0 ? -startIdx-1 : startIdx; return Collections.emptyIterator(); int finishIdx = slice.end() == ClusteringBound.TOP ? size - 1 : searchInternal(slice.end(), start, size);
private Iterator<RangeTombstone> reverseIterator(final Slice slice) int startIdx = slice.end() == ClusteringBound.TOP ? size - 1 : searchInternal(slice.end(), 0, size); return Collections.emptyIterator(); int finishIdx = slice.start() == ClusteringBound.BOTTOM ? 0 : searchInternal(slice.start(), 0, start + 1); // include same as finish
private Iterator<RangeTombstone> forwardIterator(final Slice slice) int startIdx = slice.start() == ClusteringBound.BOTTOM ? 0 : searchInternal(slice.start(), 0, size); final int start = startIdx < 0 ? -startIdx-1 : startIdx; return Collections.emptyIterator(); int finishIdx = slice.end() == ClusteringBound.TOP ? size - 1 : searchInternal(slice.end(), start, size);