@Override public ByteBuffer getColumn(Cell element) { return org.apache.cassandra.utils.ByteBufferUtil.clone(element.name().toByteBuffer()); }
public CellName apply(Cell cell) { return cell.name(); } });
public CellName apply(Cell column) { return column.name(); } };
public int compare(Cell o1, Cell o2) { return -((NativeCell) o2).compareToSimple(o1.name()); } };
public int compare(Object o1, Object o2) { return compareUnsigned((Composite) o1, ((Cell) o2).name()); } };
public int compare(Cell o1, Cell o2) { return -((NativeCell) o2).compareTo(o1.name()); } };
public int compare(Object o1, Object o2) { return compareUnsigned((Composite) o1, ((Cell) o2).name()); } };
public int compare(Object c1, Object c2) { return AbstractCellNameType.this.compare((Composite) c1, ((Cell) c2).name()); } };
public boolean isFullyCoveredBy(ColumnFamily cf, long now) { // cf will cover all the requested columns if the range it covers include // all said columns CellName first = cf.iterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name(); CellName last = cf.reverseIterator(ColumnSlice.ALL_COLUMNS_ARRAY).next().name(); return cf.getComparator().compare(first, columns.first()) <= 0 && cf.getComparator().compare(columns.last(), last) <= 0; }
private static boolean isDroppedColumn(Cell c, CFMetaData meta) { Long droppedAt = meta.getDroppedColumns().get(c.name().cql3ColumnName(meta)); return droppedAt != null && c.timestamp() <= droppedAt; }
public IndexedEntry decodeEntry(DecoratedKey indexedValue, Cell indexEntry) { int count = 1 + baseCfs.metadata.clusteringColumns().size(); CBuilder builder = baseCfs.getComparator().builder(); for (int i = 0; i < count - 1; i++) builder.add(indexEntry.name().get(i + 1)); return new IndexedEntry(indexedValue, indexEntry.name(), indexEntry.timestamp(), indexEntry.name().get(0), builder.build()); }
public Reclaimer reclaimImmediately(Cell cell) { onHeap().released(cell.name().dataSize() + cell.value().remaining()); return this; }
public IndexedEntry decodeEntry(DecoratedKey indexedValue, Cell indexEntry) { CBuilder builder = baseCfs.getComparator().builder(); for (int i = 0; i < columnDef.position(); i++) builder.add(indexEntry.name().get(i + 1)); return new IndexedEntry(indexedValue, indexEntry.name(), indexEntry.timestamp(), indexEntry.name().get(0), builder.build()); }
public SparseRowIterator(CFMetaData cfMetaData, CellNameType type, Iterator<Cell> cells, long now) { this.cfMetaData = cfMetaData; this.type = type; this.cells = cells; this.now = now; this.staticRow = hasNextCell() && nextCell.name().isStatic() ? computeNext() : null; }
public IndexedEntry decodeEntry(DecoratedKey indexedValue, Cell indexEntry) { int ckCount = baseCfs.metadata.clusteringColumns().size(); CBuilder builder = baseCfs.getComparator().builder(); for (int i = 0; i < columnDef.position(); i++) builder.add(indexEntry.name().get(i + 1)); builder.add(indexedValue.getKey()); for (int i = columnDef.position() + 1; i < ckCount; i++) builder.add(indexEntry.name().get(i)); return new IndexedEntry(indexedValue, indexEntry.name(), indexEntry.timestamp(), indexEntry.name().get(0), builder.build()); }
public boolean equals(Cell cell) { return timestamp() == cell.timestamp() && name().equals(cell.name()) && value().equals(cell.value()) && serializationFlags() == cell.serializationFlags(); }
protected void addColumn(Cell cell) throws IOException { if (columnFamily.metadata().isSuper()) { if (currentSuperColumn == null) throw new IllegalStateException("Trying to add a cell to a super column family, but no super cell has been started."); cell = cell.withUpdatedName(columnFamily.getComparator().makeCellName(currentSuperColumn, cell.name().toByteBuffer())); } columnFamily.addColumn(cell); }