@Override
public boolean containsKey(StaticBuffer key, StoreTransaction txh) throws StorageException {
try {
// See getSlice() below for a warning suppression justification
@SuppressWarnings("rawtypes")
RowQuery rq = (RowQuery) keyspace.prepareQuery(columnFamily)
.withRetryPolicy(retryPolicy.duplicate())
.setConsistencyLevel(getTx(txh).getReadConsistencyLevel().getAstyanaxConsistency())
.getKey(key.asByteBuffer());
@SuppressWarnings("unchecked")
OperationResult<ColumnList<ByteBuffer>> r = rq.withColumnRange(EMPTY, EMPTY, false, 1).execute();
return 0 < r.getResult().size();
} catch (ConnectionException e) {
throw new TemporaryStorageException(e);
}
}