use of org.apache.cassandra.db.Slice in project cassandra by apache.
the class DataResolverTest method withExclusiveStartIf.
// Forces the start to be exclusive if the condition holds
private static RangeTombstone withExclusiveStartIf(RangeTombstone rt, boolean condition) {
if (!condition)
return rt;
Slice slice = rt.deletedSlice();
ClusteringBound<?> newStart = ClusteringBound.create(Kind.EXCL_START_BOUND, slice.start());
return condition ? new RangeTombstone(Slice.make(newStart, slice.end()), rt.deletionTime()) : rt;
}
use of org.apache.cassandra.db.Slice in project cassandra by apache.
the class DataResolverTest method withExclusiveEndIf.
// Forces the end to be exclusive if the condition holds
private static RangeTombstone withExclusiveEndIf(RangeTombstone rt, boolean condition) {
if (!condition)
return rt;
Slice slice = rt.deletedSlice();
ClusteringBound<?> newEnd = ClusteringBound.create(Kind.EXCL_END_BOUND, slice.end());
return condition ? new RangeTombstone(Slice.make(slice.start(), newEnd), rt.deletionTime()) : rt;
}
Aggregations