本文整理汇总了Java中org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom方法的典型用法代码示例。如果您正苦于以下问题:Java QueryFilter.collateOnDiskAtom方法的具体用法?Java QueryFilter.collateOnDiskAtom怎么用?Java QueryFilter.collateOnDiskAtom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.db.filter.QueryFilter
的用法示例。
在下文中一共展示了QueryFilter.collateOnDiskAtom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: filterColumnFamily
import org.apache.cassandra.db.filter.QueryFilter; //导入方法依赖的package包/类
/**
* Filter a cached row, which will not be modified by the filter, but may be modified by throwing out
* tombstones that are no longer relevant.
* The returned column family won't be thread safe.
*/
ColumnFamily filterColumnFamily(ColumnFamily cached, QueryFilter filter)
{
if (cached == null)
return null;
ColumnFamily cf = cached.cloneMeShallow(ArrayBackedSortedColumns.factory, filter.filter.isReversed());
int gcBefore = gcBefore(filter.timestamp);
filter.collateOnDiskAtom(cf, filter.getIterator(cached), gcBefore);
return removeDeletedCF(cf, gcBefore);
}
示例2: filterColumnFamily
import org.apache.cassandra.db.filter.QueryFilter; //导入方法依赖的package包/类
/**
* Filter a cached row, which will not be modified by the filter, but may be modified by throwing out
* tombstones that are no longer relevant.
* The returned column family won't be thread safe.
*/
ColumnFamily filterColumnFamily(ColumnFamily cached, QueryFilter filter, int gcBefore)
{
ColumnFamily cf = cached.cloneMeShallow(ArrayBackedSortedColumns.factory(), filter.filter.isReversed());
OnDiskAtomIterator ci = filter.getMemtableColumnIterator(cached, null);
filter.collateOnDiskAtom(cf, Collections.singletonList(ci), gcBefore);
// TODO this is necessary because when we collate supercolumns together, we don't check
// their subcolumns for relevance, so we need to do a second prune post facto here.
return cf.isSuper() ? removeDeleted(cf, gcBefore) : removeDeletedCF(cf, gcBefore);
}
示例3: filterColumnFamily
import org.apache.cassandra.db.filter.QueryFilter; //导入方法依赖的package包/类
/**
* Filter a cached row, which will not be modified by the filter, but may be modified by throwing out
* tombstones that are no longer relevant.
* The returned column family won't be thread safe.
*/
ColumnFamily filterColumnFamily(ColumnFamily cached, QueryFilter filter)
{
if (cached == null)
return null;
ColumnFamily cf = cached.cloneMeShallow(ArrayBackedSortedColumns.factory, filter.filter.isReversed());
OnDiskAtomIterator ci = filter.getColumnFamilyIterator(cached);
int gcBefore = gcBefore(filter.timestamp);
filter.collateOnDiskAtom(cf, ci, gcBefore);
return removeDeletedCF(cf, gcBefore);
}