public Map<SnapshotsStreamMetadataRow, com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata> getMetadatas(Collection<SnapshotsStreamMetadataRow> rows) { Map<Cell, SnapshotsStreamMetadataRow> cells = Maps.newHashMapWithExpectedSize(rows.size()); for (SnapshotsStreamMetadataRow row : rows) { cells.put(Cell.create(row.persistToBytes(), PtBytes.toCachedBytes("md")), row); } Map<Cell, byte[]> results = t.get(tableRef, cells.keySet()); Map<SnapshotsStreamMetadataRow, com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata> ret = Maps.newHashMapWithExpectedSize(results.size()); for (Entry<Cell, byte[]> e : results.entrySet()) { com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata val = Metadata.BYTES_HYDRATOR.hydrateFromBytes(e.getValue()).getValue(); ret.put(cells.get(e.getKey()), val); } return ret; }
public com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata getMetadata() { byte[] bytes = row.getColumns().get(PtBytes.toCachedBytes("md")); if (bytes == null) { return null; } Metadata value = Metadata.BYTES_HYDRATOR.hydrateFromBytes(bytes); return value.getValue(); }
public Map<SnapshotsStreamMetadataRow, com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata> getMetadatas(Collection<SnapshotsStreamMetadataRow> rows) { Map<Cell, SnapshotsStreamMetadataRow> cells = Maps.newHashMapWithExpectedSize(rows.size()); for (SnapshotsStreamMetadataRow row : rows) { cells.put(Cell.create(row.persistToBytes(), PtBytes.toCachedBytes("md")), row); } Map<Cell, byte[]> results = t.get(tableRef, cells.keySet()); Map<SnapshotsStreamMetadataRow, com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata> ret = Maps.newHashMapWithExpectedSize(results.size()); for (Entry<Cell, byte[]> e : results.entrySet()) { com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata val = Metadata.BYTES_HYDRATOR.hydrateFromBytes(e.getValue()).getValue(); ret.put(cells.get(e.getKey()), val); } return ret; }
public com.palantir.atlasdb.protos.generated.StreamPersistence.StreamMetadata getMetadata() { byte[] bytes = row.getColumns().get(PtBytes.toCachedBytes("md")); if (bytes == null) { return null; } Metadata value = Metadata.BYTES_HYDRATOR.hydrateFromBytes(bytes); return value.getValue(); }