public Optional<SnapshotsStreamValueRowResult> getRow(SnapshotsStreamValueRow row, ColumnSelection columns) { byte[] bytes = row.persistToBytes(); RowResult<byte[]> rowResult = t.getRows(tableRef, ImmutableSet.of(bytes), columns).get(bytes); if (rowResult == null) { return Optional.empty(); } else { return Optional.of(SnapshotsStreamValueRowResult.of(rowResult)); } }
@Override public List<SnapshotsStreamValueRowResult> getRows(Iterable<SnapshotsStreamValueRow> rows, ColumnSelection columns) { SortedMap<byte[], RowResult<byte[]>> results = t.getRows(tableRef, Persistables.persistAll(rows), columns); List<SnapshotsStreamValueRowResult> rowResults = Lists.newArrayListWithCapacity(results.size()); for (RowResult<byte[]> row : results.values()) { rowResults.add(SnapshotsStreamValueRowResult.of(row)); } return rowResults; }
@Override public List<SnapshotsStreamValueRowResult> getRows(Iterable<SnapshotsStreamValueRow> rows, ColumnSelection columns) { SortedMap<byte[], RowResult<byte[]>> results = t.getRows(tableRef, Persistables.persistAll(rows), columns); List<SnapshotsStreamValueRowResult> rowResults = Lists.newArrayListWithCapacity(results.size()); for (RowResult<byte[]> row : results.values()) { rowResults.add(SnapshotsStreamValueRowResult.of(row)); } return rowResults; }
@Override public SnapshotsStreamValueRowResult apply(RowResult<byte[]> input) { return SnapshotsStreamValueRowResult.of(input); } });
public Optional<SnapshotsStreamValueRowResult> getRow(SnapshotsStreamValueRow row, ColumnSelection columns) { byte[] bytes = row.persistToBytes(); RowResult<byte[]> rowResult = t.getRows(tableRef, ImmutableSet.of(bytes), columns).get(bytes); if (rowResult == null) { return Optional.empty(); } else { return Optional.of(SnapshotsStreamValueRowResult.of(rowResult)); } }
@Override public SnapshotsStreamValueRowResult apply(RowResult<byte[]> input) { return SnapshotsStreamValueRowResult.of(input); } });