本文整理汇总了Java中org.apache.cassandra.db.OnDiskAtom.Serializer方法的典型用法代码示例。如果您正苦于以下问题:Java OnDiskAtom.Serializer方法的具体用法?Java OnDiskAtom.Serializer怎么用?Java OnDiskAtom.Serializer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.db.OnDiskAtom
的用法示例。
在下文中一共展示了OnDiskAtom.Serializer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleBlockFetcher
import org.apache.cassandra.db.OnDiskAtom; //导入方法依赖的package包/类
public SimpleBlockFetcher() throws IOException
{
// Since we have to deserialize in order and will read all slices might as well reverse the slices and
// behave as if it was not reversed
super(reversed ? slices.length - 1 : 0);
// We remenber when we are whithin a slice to avoid some comparison
boolean inSlice = false;
OnDiskAtom.Serializer atomSerializer = emptyColumnFamily.getOnDiskSerializer();
int columns = file.readInt();
for (int i = 0; i < columns; i++)
{
OnDiskAtom column = atomSerializer.deserializeFromSSTable(file, sstable.descriptor.version);
// col is before slice
// (If in slice, don't bother checking that until we change slice)
if (!inSlice && isColumnBeforeSliceStart(column))
continue;
// col is within slice
if (isColumnBeforeSliceFinish(column))
{
inSlice = true;
addColumn(column);
}
// col is after slice. more slices?
else
{
inSlice = false;
if (!setNextSlice())
break;
}
}
}
示例2: SimpleBlockFetcher
import org.apache.cassandra.db.OnDiskAtom; //导入方法依赖的package包/类
public SimpleBlockFetcher() throws IOException
{
// Since we have to deserialize in order and will read all slices might as well reverse the slices and
// behave as if it was not reversed
super(reversed ? slices.length - 1 : 0);
// We remenber when we are whithin a slice to avoid some comparison
boolean inSlice = false;
OnDiskAtom.Serializer atomSerializer = emptyColumnFamily.getOnDiskSerializer();
int columns = file.readInt();
OnDiskAtom column = null;
int i = 0;
while (i < columns || column != null)
{
// Only fetch a new column if we haven't dealt with the previous one.
if (column == null)
{
column = atomSerializer.deserializeFromSSTable(file, sstable.descriptor.version);
i++;
}
// col is before slice
// (If in slice, don't bother checking that until we change slice)
if (!inSlice && isColumnBeforeSliceStart(column))
{
column = null;
continue;
}
// col is within slice
if (isColumnBeforeSliceFinish(column))
{
inSlice = true;
addColumn(column);
column = null;
}
// col is after slice. more slices?
else
{
inSlice = false;
if (!setNextSlice())
break;
}
}
}
示例3: onDiskAtomSerializer
import org.apache.cassandra.db.OnDiskAtom; //导入方法依赖的package包/类
public OnDiskAtom.Serializer onDiskAtomSerializer();