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


Java ColumnSerializer类代码示例

本文整理汇总了Java中org.apache.cassandra.db.ColumnSerializer的典型用法代码示例。如果您正苦于以下问题:Java ColumnSerializer类的具体用法?Java ColumnSerializer怎么用?Java ColumnSerializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ColumnSerializer类属于org.apache.cassandra.db包,在下文中一共展示了ColumnSerializer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: deserialize

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public PrepareResponse deserialize(DataInput in, int version) throws IOException
{
    boolean success = in.readBoolean();
    ByteBuffer key = ByteBufferUtil.readWithShortLength(in);
    return new PrepareResponse(success,
                               new Commit(key,
                                          UUIDSerializer.serializer.deserialize(in, version),
                                          ColumnFamily.serializer.deserialize(in,
                                                                              ArrayBackedSortedColumns.factory,
                                                                              ColumnSerializer.Flag.LOCAL, version)),
                               new Commit(key,
                                          UUIDSerializer.serializer.deserialize(in, version),
                                          ColumnFamily.serializer.deserialize(in,
                                                                              ArrayBackedSortedColumns.factory,
                                                                              ColumnSerializer.Flag.LOCAL, version)));
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:17,代码来源:PrepareResponse.java

示例2: readFields

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
@Override
public void readFields(DataInput dis) throws IOException {
    int length = dis.readInt();
    byte[] bytes = new byte[length];
    dis.readFully(bytes);
    this.key = bytes;
    this.deletedAt = dis.readLong();

    boolean hasAtom = dis.readBoolean();
    if (hasAtom) {
        this.atom = serializer.deserializeFromSSTable(
                dis, ColumnSerializer.Flag.PRESERVE_SIZE, Integer.MIN_VALUE, version
        );
    } else {
        this.atom = null;
    }
}
 
开发者ID:Netflix,项目名称:aegisthus,代码行数:18,代码来源:AtomWritable.java

示例3: deserialize

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public PrepareResponse deserialize(DataInput in, int version) throws IOException
{
    boolean success = in.readBoolean();
    ByteBuffer key = ByteBufferUtil.readWithShortLength(in);
    return new PrepareResponse(success,
                               new Commit(key,
                                          UUIDSerializer.serializer.deserialize(in, version),
                                          ColumnFamily.serializer.deserialize(in, UnsortedColumns.factory, ColumnSerializer.Flag.LOCAL, version)),
                               new Commit(key,
                                          UUIDSerializer.serializer.deserialize(in, version),
                                          ColumnFamily.serializer.deserialize(in, UnsortedColumns.factory, ColumnSerializer.Flag.LOCAL, version)));
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:13,代码来源:PrepareResponse.java

示例4: ColumnSortedMap

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnSortedMap(Comparator<ByteBuffer> comparator, ColumnSerializer serializer, DataInput dis, int length, IColumnSerializer.Flag flag, int expireBefore)
{
    this.comparator = comparator;
    this.serializer = serializer;
    this.dis = dis;
    this.length = length;
    this.flag = flag;
    this.expireBefore = expireBefore;
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:10,代码来源:ColumnSortedMap.java

示例5: ColumnSet

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnSet(ColumnSerializer serializer, DataInput dis, int length, IColumnSerializer.Flag flag, int expireBefore)
{
    this.serializer = serializer;
    this.dis = dis;
    this.length = length;
    this.flag = flag;
    this.expireBefore = expireBefore;
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:9,代码来源:ColumnSortedMap.java

示例6: ColumnIterator

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnIterator(ColumnSerializer serializer, DataInput dis, int length, IColumnSerializer.Flag flag, int expireBefore)
{
    this.dis = dis;
    this.serializer = serializer;
    this.length = length;
    this.flag = flag;
    this.expireBefore = expireBefore;
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:9,代码来源:ColumnSortedMap.java

示例7: deserializeColumns

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
long deserializeColumns(Subscriber<? super AtomWritable> subscriber, byte[] rowKey, long deletedAt,
        int count,
        DataInput columns) throws IOException {
    long columnSize = 0;
    int actualColumnCount = 0;
    for (int i = 0; i < count; i++, actualColumnCount++) {
        // serialize columns
        OnDiskAtom atom = serializer.deserializeFromSSTable(
                columns, ColumnSerializer.Flag.PRESERVE_SIZE, Integer.MIN_VALUE, version
        );
        if (atom == null) {
            // If atom was null that means this was a version that does not have version.hasRowSizeAndColumnCount
            // So we have to add the size for the end of row marker also
            columnSize += 2;
            break;
        }
        columnSize += atom.serializedSizeForSSTable();
        subscriber.onNext(AtomWritable.createWritable(rowKey, deletedAt, atom));
    }

    // This is a row with no columns, we still create a writable because we want to preserve this information
    if (actualColumnCount == 0) {
        subscriber.onNext(AtomWritable.createWritable(rowKey, deletedAt, null));
    }

    return columnSize;
}
 
开发者ID:Netflix,项目名称:aegisthus,代码行数:28,代码来源:SSTableColumnScanner.java

示例8: readFields

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    deletedAt = in.readLong();
    int columnCount = in.readInt();
    columns = Lists.newArrayListWithCapacity(columnCount);
    for (int i = 0; i < columnCount; i++) {
        OnDiskAtom atom = serializer.deserializeFromSSTable(
                in, ColumnSerializer.Flag.PRESERVE_SIZE, Integer.MIN_VALUE, version
        );
        columns.add(atom);
    }
}
 
开发者ID:Netflix,项目名称:aegisthus,代码行数:13,代码来源:RowWritable.java

示例9: ColumnSortedMap

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnSortedMap(Comparator<ByteBuffer> comparator, ColumnSerializer serializer, DataInput dis, ColumnFamilyStore interner, int length, boolean fromRemote, int expireBefore)
{
    this.comparator = comparator;
    this.serializer = serializer;
    this.interner = interner;
    this.dis = dis;
    this.length = length;
    this.fromRemote = fromRemote;
    this.expireBefore = expireBefore;
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:11,代码来源:ColumnSortedMap.java

示例10: ColumnSet

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnSet(ColumnSerializer serializer, DataInput dis, ColumnFamilyStore interner, int length, boolean fromRemote, int expireBefore)
{
    this.serializer = serializer;
    this.dis = dis;
    this.interner = interner;
    this.length = length;
    this.fromRemote = fromRemote;
    this.expireBefore = expireBefore;
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:10,代码来源:ColumnSortedMap.java

示例11: ColumnIterator

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public ColumnIterator(ColumnSerializer serializer, DataInput dis, ColumnFamilyStore interner, int length, boolean fromRemote, int expireBefore)
{
    this.dis = dis;
    this.serializer = serializer;
    this.interner = interner;
    this.length = length;
    this.fromRemote = fromRemote;
    this.expireBefore = expireBefore;
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:10,代码来源:ColumnSortedMap.java

示例12: deserialize

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public Commit deserialize(DataInput in, int version) throws IOException
{
    return new Commit(ByteBufferUtil.readWithShortLength(in),
                      UUIDSerializer.serializer.deserialize(in, version),
                      ColumnFamily.serializer.deserialize(in, UnsortedColumns.factory, ColumnSerializer.Flag.LOCAL, version));
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:7,代码来源:Commit.java

示例13: getOnDiskIterator

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public Iterator<OnDiskAtom> getOnDiskIterator(DataInput in, Descriptor.Version version)
{
    return getOnDiskIterator(in, ColumnSerializer.Flag.LOCAL, Integer.MIN_VALUE, version);
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:5,代码来源:CFMetaData.java

示例14: getOnDiskDeserializer

import org.apache.cassandra.db.ColumnSerializer; //导入依赖的package包/类
public AtomDeserializer getOnDiskDeserializer(DataInput in, Descriptor.Version version)
{
    return new AtomDeserializer(comparator, in, ColumnSerializer.Flag.LOCAL, Integer.MIN_VALUE, version);
}
 
开发者ID:daidong,项目名称:GraphTrek,代码行数:5,代码来源:CFMetaData.java

示例15: columnSerializer

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


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