本文整理汇总了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())));
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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()));
}
示例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());
}
示例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());
}