com.palantir.atlasdb.transaction.api.Transaction.delete()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中com.palantir.atlasdb.transaction.api.Transaction.delete()方法的一些代码示例,展示了Transaction.delete()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transaction.delete()方法的具体详情如下:
包路径:com.palantir.atlasdb.transaction.api.Transaction
类名称:Transaction
方法名:delete

Transaction.delete介绍

[英]Deletes values from the key-value store.
[中]从键值存储中删除值。

代码示例

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<LatestSnapshotRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("i")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<ValueStreamMetadataRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("md")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<TodoRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("t")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<DataStreamValueRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("v")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<BlobsSerializableRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("d")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<UserPhotosStreamMetadataRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("md")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteStreamId(Iterable<KeyValueRow> rows) {
  byte[] col = PtBytes.toCachedBytes("s");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteId(Iterable<SweepNameToIdRow> rows) {
  byte[] col = PtBytes.toCachedBytes("i");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteLastClearedTimestamp(Iterable<TableClearsRow> rows) {
  byte[] col = PtBytes.toCachedBytes("l");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteMinimumSweptTimestamp(Iterable<SweepPriorityRow> rows) {
  byte[] col = PtBytes.toCachedBytes("m");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteValue(Iterable<UserPhotosStreamValueRow> rows) {
  byte[] col = PtBytes.toCachedBytes("v");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deletePhotoStreamId(Iterable<UserProfileRow> rows) {
  byte[] col = PtBytes.toCachedBytes("p");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteMetadata(Iterable<UserPhotosStreamMetadataRow> rows) {
  byte[] col = PtBytes.toCachedBytes("md");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteData(Iterable<MetadataRow> rows) {
  byte[] col = PtBytes.toCachedBytes("d");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<SweepPriorityRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size() * 5);
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("d")));
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("e")));
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("t")));
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("m")));
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("w")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<StreamTestMaxMemStreamMetadataRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("md")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

@Override
public void delete(Iterable<StreamTestStreamMetadataRow> rows) {
  List<byte[]> rowBytes = Persistables.persistAll(rows);
  Set<Cell> cells = Sets.newHashSetWithExpectedSize(rowBytes.size());
  cells.addAll(Cells.cellsWithConstantColumn(rowBytes, PtBytes.toCachedBytes("md")));
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteValue(Iterable<StreamTestStreamValueRow> rows) {
  byte[] col = PtBytes.toCachedBytes("v");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteStreamId(Iterable<KeyValueRow> rows) {
  byte[] col = PtBytes.toCachedBytes("s");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  t.delete(tableRef, cells);
}

代码示例来源:origin: palantir/atlasdb

public void deleteFoo(Iterable<TwoColumnsRow> rows) {
  byte[] col = PtBytes.toCachedBytes("f");
  Set<Cell> cells = Cells.cellsWithConstantColumn(Persistables.persistAll(rows), col);
  Map<Cell, byte[]> results = t.get(tableRef, cells);
  deleteFooToIdCondIdxRaw(results);
  deleteFooToIdIdxRaw(results);
  t.delete(tableRef, cells);
}

相关文章