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


Java DataOutputBuffer.writeLong方法代码示例

本文整理汇总了Java中org.apache.cassandra.io.util.DataOutputBuffer.writeLong方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutputBuffer.writeLong方法的具体用法?Java DataOutputBuffer.writeLong怎么用?Java DataOutputBuffer.writeLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cassandra.io.util.DataOutputBuffer的用法示例。


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

示例1: truncationAsMapEntry

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
private static String truncationAsMapEntry(ColumnFamilyStore cfs, long truncatedAt, ReplayPosition position)
{
    DataOutputBuffer out = new DataOutputBuffer();
    try
    {
        ReplayPosition.serializer.serialize(position, out);
        out.writeLong(truncatedAt);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    return String.format("{%s: 0x%s}",
                         cfs.metadata.cfId,
                         ByteBufferUtil.bytesToHex(ByteBuffer.wrap(out.getData(), 0, out.getLength())));
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:17,代码来源:SystemKeyspace.java

示例2: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
public void updateDigest(MessageDigest digest)
{
    digest.update(name.duplicate());
    digest.update(value.duplicate());

    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:18,代码来源:Column.java

示例3: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
@Override
public void updateDigest(MessageDigest digest)
{
    digest.update(name.duplicate());
    // We don't take the deltas into account in a digest
    contextManager.updateDigest(digest, value);
    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
        buffer.writeLong(timestampOfLastDelete);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:20,代码来源:CounterColumn.java

示例4: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
@Override
public void updateDigest(MessageDigest digest)
{
    digest.update(name.duplicate());
    digest.update(value.duplicate());

    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
        buffer.writeInt(timeToLive);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:20,代码来源:ExpiringColumn.java

示例5: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
@Override
public void updateDigest(MessageDigest digest)
{
    digest.update(name.duplicate());

    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:18,代码来源:DeletedColumn.java

示例6: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
@Override
public void updateDigest(MessageDigest digest)
{
    digest.update(name.toByteBuffer().duplicate());
    // We don't take the deltas into account in a digest
    contextManager.updateDigest(digest, value);
    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
        buffer.writeLong(timestampOfLastDelete);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:mafernandez-stratio,项目名称:cassandra-cqlMod,代码行数:20,代码来源:CounterCell.java

示例7: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
@Override
public void updateDigest(MessageDigest digest)
{
    digest.update(name.toByteBuffer().duplicate());

    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(timestamp);
        buffer.writeByte(serializationFlags());
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:18,代码来源:DeletedCell.java

示例8: truncationAsMapEntry

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
private static Map<UUID, ByteBuffer> truncationAsMapEntry(ColumnFamilyStore cfs, long truncatedAt, ReplayPosition position)
{
    DataOutputBuffer out = new DataOutputBuffer();
    try
    {
        ReplayPosition.serializer.serialize(position, out);
        out.writeLong(truncatedAt);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    return Collections.<UUID, ByteBuffer>singletonMap(cfs.metadata.cfId, ByteBuffer.wrap(out.getData(), 0, out.getLength()));
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:SystemKeyspace.java

示例9: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
public void updateDigest(MessageDigest digest)
{
    digest.update(min.toByteBuffer().duplicate());
    digest.update(max.toByteBuffer().duplicate());
    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(data.markedForDeleteAt);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:16,代码来源:RangeTombstone.java

示例10: updateDigest

import org.apache.cassandra.io.util.DataOutputBuffer; //导入方法依赖的package包/类
public void updateDigest(MessageDigest digest)
{
    digest.update(min.duplicate());
    digest.update(max.duplicate());
    DataOutputBuffer buffer = new DataOutputBuffer();
    try
    {
        buffer.writeLong(data.markedForDeleteAt);
    }
    catch (IOException e)
    {
        throw new RuntimeException(e);
    }
    digest.update(buffer.getData(), 0, buffer.getLength());
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:16,代码来源:RangeTombstone.java


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