public static BufferCell live(ColumnDefinition column, long timestamp, ByteBuffer value) { return live(column, timestamp, value, null); }
public static BufferCell live(ColumnDefinition column, long timestamp, ByteBuffer value) { return live(column, timestamp, value, null); }
public static BufferCell live(ColumnDefinition column, long timestamp, ByteBuffer value) { return live(column, timestamp, value, null); }
public static BufferCell live(ColumnDefinition column, long timestamp, ByteBuffer value) { return live(column, timestamp, value, null); }
private Cell cell(ColumnDefinition column, ByteBuffer value, CellPath path) { if (value == null) return BufferCell.tombstone(column, timestamp, nowInSec, path); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); }
private Cell cell(ColumnDefinition column, ByteBuffer value, CellPath path) { if (value == null) return BufferCell.tombstone(column, timestamp, nowInSec, path); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); }
public void addCell(ColumnDefinition column, CellPath path, ByteBuffer value) throws InvalidRequestException { Cell cell = ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); builder.addCell(cell); }
public void addCell(ColumnDefinition column, CellPath path, ByteBuffer value) throws InvalidRequestException { Cell cell = ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); builder.addCell(cell); }
private Cell cell(ColumnDefinition column, ByteBuffer value, CellPath path) { if (value == null) return BufferCell.tombstone(column, timestamp, nowInSec, path); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); }
public void addCell(ColumnDefinition column, CellPath path, ByteBuffer value) throws InvalidRequestException { Cell cell = ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); builder.addCell(cell); }
public void addCell(ColumnDefinition column, CellPath path, ByteBuffer value) throws InvalidRequestException { Cell cell = ttl == LivenessInfo.NO_TTL ? BufferCell.live(column, timestamp, value, path) : BufferCell.expiring(column, timestamp, ttl, nowInSec, value, path); builder.addCell(cell); }
public void addCounter(ColumnDefinition column, long increment) throws InvalidRequestException { assert ttl == LivenessInfo.NO_TTL; // Because column is a counter, we need the value to be a CounterContext. However, we're only creating a // "counter update", which is a temporary state until we run into 'CounterMutation.updateWithCurrentValue()' // which does the read-before-write and sets the proper CounterId, clock and updated value. // // We thus create a "fake" local shard here. The CounterId/clock used don't matter as this is just a temporary // state that will be replaced when processing the mutation in CounterMutation, but the reason we use a 'local' // shard is due to the merging rules: if a user includes multiple updates to the same counter in a batch, those // multiple updates will be merged in the PartitionUpdate *before* they even reach CounterMutation. So we need // such update to be added together, and that's what a local shard gives us. builder.addCell(BufferCell.live(column, timestamp, CounterContext.instance().createLocal(increment))); }
public void addCounter(ColumnDefinition column, long increment, CellPath path) throws InvalidRequestException { assert ttl == LivenessInfo.NO_TTL; // Because column is a counter, we need the value to be a CounterContext. However, we're only creating a // "counter update", which is a temporary state until we run into 'CounterMutation.updateWithCurrentValue()' // which does the read-before-write and sets the proper CounterId, clock and updated value. // // We thus create a "fake" local shard here. The clock used doesn't matter as this is just a temporary // state that will be replaced when processing the mutation in CounterMutation, but the reason we use a 'local' // shard is due to the merging rules: if a user includes multiple updates to the same counter in a batch, those // multiple updates will be merged in the PartitionUpdate *before* they even reach CounterMutation. So we need // such update to be added together, and that's what a local shard gives us. // // We set counterid to a special value to differentiate between regular pre-2.0 local shards from pre-2.1 era // and "counter update" temporary state cells. Please see CounterContext.createUpdate() for further details. builder.addCell(BufferCell.live(column, timestamp, CounterContext.instance().createUpdate(increment), path)); }
public void addCounter(ColumnDefinition column, long increment, CellPath path) throws InvalidRequestException { assert ttl == LivenessInfo.NO_TTL; // Because column is a counter, we need the value to be a CounterContext. However, we're only creating a // "counter update", which is a temporary state until we run into 'CounterMutation.updateWithCurrentValue()' // which does the read-before-write and sets the proper CounterId, clock and updated value. // // We thus create a "fake" local shard here. The clock used doesn't matter as this is just a temporary // state that will be replaced when processing the mutation in CounterMutation, but the reason we use a 'local' // shard is due to the merging rules: if a user includes multiple updates to the same counter in a batch, those // multiple updates will be merged in the PartitionUpdate *before* they even reach CounterMutation. So we need // such update to be added together, and that's what a local shard gives us. // // We set counterid to a special value to differentiate between regular pre-2.0 local shards from pre-2.1 era // and "counter update" temporary state cells. Please see CounterContext.createUpdate() for further details. builder.addCell(BufferCell.live(column, timestamp, CounterContext.instance().createUpdate(increment), path)); }
public void addCounter(ColumnDefinition column, long increment, CellPath path) throws InvalidRequestException { assert ttl == LivenessInfo.NO_TTL; // Because column is a counter, we need the value to be a CounterContext. However, we're only creating a // "counter update", which is a temporary state until we run into 'CounterMutation.updateWithCurrentValue()' // which does the read-before-write and sets the proper CounterId, clock and updated value. // // We thus create a "fake" local shard here. The clock used doesn't matter as this is just a temporary // state that will be replaced when processing the mutation in CounterMutation, but the reason we use a 'local' // shard is due to the merging rules: if a user includes multiple updates to the same counter in a batch, those // multiple updates will be merged in the PartitionUpdate *before* they even reach CounterMutation. So we need // such update to be added together, and that's what a local shard gives us. // // We set counterid to a special value to differentiate between regular pre-2.0 local shards from pre-2.1 era // and "counter update" temporary state cells. Please see CounterContext.createUpdate() for further details. builder.addCell(BufferCell.live(column, timestamp, CounterContext.instance().createUpdate(increment), path)); }
private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column) { CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement); int ttl = getTtl(metadata, column); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(name.column, column.timestamp, column.value, path) : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path); }
private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column) { CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement); int ttl = getTtl(metadata, column); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(name.column, column.timestamp, column.value, path) : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path); }
Cell cell = BufferCell.live(name.column, FBUtilities.timestampMicros(), value, path);
Cell cell = BufferCell.live(name.column, FBUtilities.timestampMicros(), value, path);