Reference Guide

Table Of Contents
context.getTransactionContext()
.prepareTransaction(AlertsCount.COL_FAMILY.getName(),
AlertsCount.ROW_KEY);
CassandraStorable<String, String> row =
context.getTransactionContext().
executeCriticalSection(procedure);
for (Column<String, ?> col : row.getColumns()) {
id.add(col.getName().getValue());
}
return id;
}
if (filter.getOriginCondition() != null) {
final ByteBufferRange range;
switch (filter.getOriginCondition().getMode()) {
case EQUAL:
range = AlertsByOrigin.serializer.buildRange()
.withPrefix(filter.getOriginCondition()
.getValue());
break;
case STARTS_WITH:
range = AlertsByOrigin.serializer.buildRange()
.greaterThanEquals(filter
.getOriginCondition()
.getValue())
.lessThan("~");
break;
default:
range = null;
break;
}
// Find Rows for this filter
Procedure<CassandraStorable<String, Origin>> procedure =
new Procedure<CassandraStorable<String, Origin>>() {
@Override
public CassandraStorable<String, Origin> execute()
throws Exception {
return context.getContext()
.get(AlertsByOrigin.COL_FAMILY,
AlertsByOrigin.ROW_KEY, range,
AlertsByOrigin.ORIGIN_DECODER);
}
};
105