当前位置: 首页>>代码示例>>Java>>正文


Java OnDiskAtom.Serializer方法代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:37,代码来源:IndexedSliceReader.java

示例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;
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-cassandra,代码行数:48,代码来源:IndexedSliceReader.java

示例3: onDiskAtomSerializer

import org.apache.cassandra.db.OnDiskAtom; //导入方法依赖的package包/类
public OnDiskAtom.Serializer onDiskAtomSerializer(); 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:2,代码来源:CellNameType.java


注:本文中的org.apache.cassandra.db.OnDiskAtom.Serializer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。