/** * The type of the cell values for cell belonging to this column. * * This is the same than the column type, except for collections where it's the 'valueComparator' * of the collection. */ public AbstractType<?> cellValueType() { return type instanceof CollectionType ? ((CollectionType)type).valueComparator() : type; }
@Override protected AbstractType<?> getIndexKeyComparator() { return ((CollectionType)columnDef.type).valueComparator(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { return ((CollectionType)indexedColumn.type).valueComparator(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { return ((CollectionType)indexedColumn.type).valueComparator(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { return ((CollectionType)indexedColumn.type).valueComparator(); }
public boolean isCounterColumn() { if (type instanceof CollectionType) // for thrift return ((CollectionType) type).valueComparator().isCounter(); return type.isCounter(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { CollectionType colType = (CollectionType)indexedColumn.type; return CompositeType.getInstance(colType.nameComparator(), colType.valueComparator()); } };
public boolean isCounterColumn() { if (type instanceof CollectionType) // for thrift return ((CollectionType) type).valueComparator().isCounter(); return type.isCounter(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { CollectionType colType = (CollectionType)indexedColumn.type; return CompositeType.getInstance(colType.nameComparator(), colType.valueComparator()); } };
public boolean isCounterColumn() { if (type instanceof CollectionType) // for thrift return ((CollectionType) type).valueComparator().isCounter(); return type.isCounter(); }
public AbstractType<?> getIndexedValueType(ColumnDefinition indexedColumn) { CollectionType colType = (CollectionType)indexedColumn.type; return CompositeType.getInstance(colType.nameComparator(), colType.valueComparator()); } };
@Override public void validateCellValue(ByteBuffer cellValue) throws MarshalException { if (isMultiCell()) valueComparator().validateCellValue(cellValue); else super.validateCellValue(cellValue); }
@Override public void validateCellValue(ByteBuffer cellValue) throws MarshalException { if (isMultiCell()) valueComparator().validateCellValue(cellValue); else super.validateCellValue(cellValue); }
@Override public void validateCellValue(ByteBuffer cellValue) throws MarshalException { if (isMultiCell()) valueComparator().validateCellValue(cellValue); else super.validateCellValue(cellValue); }
@Override public void validateCellValue(ByteBuffer cellValue) throws MarshalException { if (isMultiCell()) valueComparator().validate(cellValue); else super.validateCellValue(cellValue); }
@Override public void validateCellValue(ByteBuffer cellValue) throws MarshalException { if (isMultiCell()) valueComparator().validateCellValue(cellValue); else super.validateCellValue(cellValue); }
public boolean isStale(IndexedEntry entry, ColumnFamily data, long now) { CellName name = data.getComparator().create(entry.indexedEntryPrefix, columnDef, entry.indexedEntryCollectionKey); Cell cell = data.getColumn(name); return cell == null || !cell.isLive(now) || ((CollectionType) columnDef.type).valueComparator().compare(entry.indexValue.getKey(), cell.value()) != 0; } }
public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec) { ByteBuffer[] components = ((CompositeType)functions.getIndexedValueType(indexedColumn)).split(indexValue); ByteBuffer mapKey = components[0]; ByteBuffer mapValue = components[1]; ColumnDefinition columnDef = indexedColumn; Cell cell = data.getCell(columnDef, CellPath.create(mapKey)); if (cell == null || !cell.isLive(nowInSec)) return true; AbstractType<?> valueComparator = ((CollectionType)columnDef.type).valueComparator(); return valueComparator.compare(mapValue, cell.value()) != 0; } }
public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec) { ByteBuffer[] components = ((CompositeType)functions.getIndexedValueType(indexedColumn)).split(indexValue); ByteBuffer mapKey = components[0]; ByteBuffer mapValue = components[1]; ColumnDefinition columnDef = indexedColumn; Cell cell = data.getCell(columnDef, CellPath.create(mapKey)); if (cell == null || !cell.isLive(nowInSec)) return true; AbstractType<?> valueComparator = ((CollectionType)columnDef.type).valueComparator(); return valueComparator.compare(mapValue, cell.value()) != 0; } }
public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec) { ByteBuffer[] components = ((CompositeType)functions.getIndexedValueType(indexedColumn)).split(indexValue); ByteBuffer mapKey = components[0]; ByteBuffer mapValue = components[1]; ColumnDefinition columnDef = indexedColumn; Cell cell = data.getCell(columnDef, CellPath.create(mapKey)); if (cell == null || !cell.isLive(nowInSec)) return true; AbstractType<?> valueComparator = ((CollectionType)columnDef.type).valueComparator(); return valueComparator.compare(mapValue, cell.value()) != 0; } }