use of com.palantir.atlasdb.keyvalue.impl.Cells in project atlasdb by palantir.
the class CassandraKeyValueServiceImpl method addGarbageCollectionSentinelValues.
/**
* Adds a value with timestamp = Value.INVALID_VALUE_TIMESTAMP to each of the given cells. If
* a value already exists at that time stamp, nothing is written for that cell.
* <p>
* Does not require all Cassandra nodes to be up and available, works as long as quorum is achieved.
*
* @param tableRef the name of the table to add the value to.
* @param cells a set of cells to store the values in.
*/
@Override
public void addGarbageCollectionSentinelValues(TableReference tableRef, Iterable<Cell> cells) {
try {
final Value value = Value.create(PtBytes.EMPTY_BYTE_ARRAY, Value.INVALID_VALUE_TIMESTAMP);
cellValuePutter.put("addGarbageCollectionSentinelValues", tableRef, Iterables.transform(cells, cell -> Maps.immutableEntry(cell, value)));
} catch (Exception e) {
throw QosAwareThrowables.unwrapAndThrowRateLimitExceededOrAtlasDbDependencyException(e);
}
}
use of com.palantir.atlasdb.keyvalue.impl.Cells in project atlasdb by palantir.
the class CqlKeyValueService method addGarbageCollectionSentinelValues.
@Override
public void addGarbageCollectionSentinelValues(TableReference tableRef, Iterable<Cell> cells) {
try {
final Value value = Value.create(new byte[0], Value.INVALID_VALUE_TIMESTAMP);
putInternal(tableRef, Iterables.transform(cells, cell -> Maps.immutableEntry(cell, value)), TransactionType.NONE);
} catch (Throwable t) {
throw Throwables.throwUncheckedException(t);
}
}
Aggregations