public ComplexColumnData getComplexColumnData(ColumnDefinition c) { assert c.isComplex(); return (ComplexColumnData) BTree.<Object>find(btree, ColumnDefinition.asymmetricColumnDataComparator, c); }
public Cell getCell(ColumnDefinition c) { assert !c.isComplex(); return (Cell) BTree.<Object>find(btree, ColumnDefinition.asymmetricColumnDataComparator, c); }
ComplexColumnData(ColumnDefinition column, Object[] cells, DeletionTime complexDeletion) { super(column); assert column.isComplex(); assert cells.length > 0 || !complexDeletion.isLive(); this.cells = cells; this.complexDeletion = complexDeletion; }
public Cell getCell(ColumnDefinition c) { assert !c.isComplex(); return (Cell) BTree.<Object>find(btree, ColumnDefinition.asymmetricColumnDataComparator, c); }
public ComplexColumnData getComplexColumnData(ColumnDefinition c) { assert c.isComplex(); return (ComplexColumnData) BTree.<Object>find(btree, ColumnDefinition.asymmetricColumnDataComparator, c); }
public boolean hasComplexColumns() { for (ColumnDefinition def : partitionColumns()) if (def.isComplex()) return true; return false; }
ComplexColumnData(ColumnDefinition column, Object[] cells, DeletionTime complexDeletion) { super(column); assert column.isComplex(); assert cells.length > 0 || !complexDeletion.isLive(); this.cells = cells; this.complexDeletion = complexDeletion; }
public BufferCell(ColumnDefinition column, long timestamp, int ttl, int localDeletionTime, ByteBuffer value, CellPath path) { super(column); assert !column.isPrimaryKeyColumn(); assert column.isComplex() == (path != null); this.timestamp = timestamp; this.ttl = ttl; this.localDeletionTime = localDeletionTime; this.value = value; this.path = path; }
private void addColumnData(ColumnDefinition viewColumn, ColumnData baseTableData) { assert viewColumn.isComplex() == baseTableData.column().isComplex(); if (!viewColumn.isComplex()) { addCell(viewColumn, (Cell)baseTableData); return; } ComplexColumnData complexData = (ComplexColumnData)baseTableData; currentViewEntryBuilder.addComplexDeletion(viewColumn, complexData.complexDeletion()); for (Cell cell : complexData) addCell(viewColumn, cell); }
public Cell getCell(ColumnDefinition c, CellPath path) { assert c.isComplex(); ComplexColumnData cd = getComplexColumnData(c); if (cd == null) return null; return cd.getCell(path); }
public static ColumnSubselection element(ColumnDefinition column, CellPath elt) { assert column.isComplex() && column.type instanceof CollectionType; assert elt.size() == 1; return new Element(column, elt); }
public static ColumnSubselection element(ColumnDefinition column, CellPath elt) { assert column.isComplex() && column.type instanceof CollectionType; assert elt.size() == 1; return new Element(column, elt); }
public Cell getCell(ColumnDefinition c, CellPath path) { assert c.isComplex(); ComplexColumnData cd = getComplexColumnData(c); if (cd == null) return null; return cd.getCell(path); }
public boolean hasComplex() { // We start by the end cause we know complex columns sort after the simple ones ColumnData cd = Iterables.getFirst(BTree.<ColumnData>iterable(btree, BTree.Dir.DESC), null); return cd != null && cd.column.isComplex(); }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
public void removeRow(Row row) { if (isPrimaryKeyIndex()) return; if (indexedColumn.isComplex()) removeCells(row.clustering(), row.getComplexColumnData(indexedColumn)); else removeCell(row.clustering(), row.getCell(indexedColumn)); }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
private void validateCellPath(CellPath path) { if (!isComplex()) throw new MarshalException("Only complex cells should have a cell path"); assert type.isMultiCell(); if (type.isCollection()) ((CollectionType)type).nameComparator().validate(path.get(0)); else ((UserType)type).nameComparator().validate(path.get(0)); }
private void validateCellPath(CellPath path) { if (!isComplex()) throw new MarshalException("Only complex cells should have a cell path"); assert type.isMultiCell(); if (type.isCollection()) ((CollectionType)type).nameComparator().validate(path.get(0)); else ((UserType)type).nameComparator().validate(path.get(0)); }