public static <V> BTreeSet<V> of(Comparator<? super V> comparator, V value) { return new BTreeSet<>(BTree.singleton(value), comparator); } }
public static <V> BTreeSet<V> of(Comparator<? super V> comparator, V value) { return new BTreeSet<>(BTree.singleton(value), comparator); } }
public static <V> BTreeSet<V> of(Comparator<? super V> comparator, V value) { return new BTreeSet<>(BTree.singleton(value), comparator); } }
public static <V> BTreeSet<V> of(Comparator<? super V> comparator, V value) { return new BTreeSet<>(BTree.singleton(value), comparator); } }
/** * Creates a {@code Columns} holding only the one column provided. * * @param c the column for which to create a {@code Columns} object. * * @return the newly created {@code Columns} containing only {@code c}. */ public static Columns of(ColumnDefinition c) { return new Columns(BTree.singleton(c), c.isComplex() ? 0 : 1); }
/** * Creates a {@code Columns} holding only the one column provided. * * @param c the column for which to create a {@code Columns} object. * * @return the newly created {@code Columns} containing only {@code c}. */ public static Columns of(ColumnDefinition c) { return new Columns(BTree.singleton(c), c.isComplex() ? 0 : 1); }
/** * Creates a {@code Columns} holding only the one column provided. * * @param c the column for which to create a {@code Columns} object. * * @return the newly created {@code Columns} containing only {@code c}. */ public static Columns of(ColumnDefinition c) { return new Columns(BTree.singleton(c), c.isComplex() ? 0 : 1); }
/** * Creates a {@code Columns} holding only the one column provided. * * @param c the column for which to create a {@code Columns} object. * * @return the newly created {@code Columns} containing only {@code c}. */ public static Columns of(ColumnDefinition c) { return new Columns(BTree.singleton(c), c.isComplex() ? 0 : 1); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
public static BTreeRow singleCellRow(Clustering clustering, Cell cell) { if (cell.column().isSimple()) return new BTreeRow(clustering, BTree.singleton(cell), minDeletionTime(cell)); ComplexColumnData complexData = new ComplexColumnData(cell.column(), new Cell[]{ cell }, DeletionTime.LIVE); return new BTreeRow(clustering, BTree.singleton(complexData), minDeletionTime(cell)); }
/** * Creates an immutable partition update that contains a single row update. * * @param metadata the metadata for the created update. * @param key the partition key for the partition to update. * @param row the row for the update (may be null). * @param row the static row for the update (may be null). * * @return the newly created partition update containing only {@code row}. */ public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row, Row staticRow) { MutableDeletionInfo deletionInfo = MutableDeletionInfo.live(); Holder holder = new Holder( new PartitionColumns( staticRow == null ? Columns.NONE : Columns.from(staticRow.columns()), row == null ? Columns.NONE : Columns.from(row.columns()) ), row == null ? BTree.empty() : BTree.singleton(row), deletionInfo, staticRow == null ? Rows.EMPTY_STATIC_ROW : staticRow, EncodingStats.NO_STATS ); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); }
/** * Creates an immutable partition update that contains a single row update. * * @param metadata the metadata for the created update. * @param key the partition key for the partition to update. * @param row the row for the update (may be null). * @param row the static row for the update (may be null). * * @return the newly created partition update containing only {@code row}. */ public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row, Row staticRow) { MutableDeletionInfo deletionInfo = MutableDeletionInfo.live(); Holder holder = new Holder( new PartitionColumns( staticRow == null ? Columns.NONE : Columns.from(staticRow.columns()), row == null ? Columns.NONE : Columns.from(row.columns()) ), row == null ? BTree.empty() : BTree.singleton(row), deletionInfo, staticRow == null ? Rows.EMPTY_STATIC_ROW : staticRow, EncodingStats.NO_STATS ); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); }
/** * Creates an immutable partition update that contains a single row update. * * @param metadata the metadata for the created update. * @param key the partition key for the partition to update. * @param row the row for the update. * * @return the newly created partition update containing only {@code row}. */ public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row) { MutableDeletionInfo deletionInfo = MutableDeletionInfo.live(); if (row.isStatic()) { Holder holder = new Holder(new PartitionColumns(Columns.from(row.columns()), Columns.NONE), BTree.empty(), deletionInfo, row, EncodingStats.NO_STATS); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); } else { Holder holder = new Holder(new PartitionColumns(Columns.NONE, Columns.from(row.columns())), BTree.singleton(row), deletionInfo, Rows.EMPTY_STATIC_ROW, EncodingStats.NO_STATS); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); } }
/** * Creates an immutable partition update that contains a single row update. * * @param metadata the metadata for the created update. * @param key the partition key for the partition to update. * @param row the row for the update. * * @return the newly created partition update containing only {@code row}. */ public static PartitionUpdate singleRowUpdate(CFMetaData metadata, DecoratedKey key, Row row) { MutableDeletionInfo deletionInfo = MutableDeletionInfo.live(); if (row.isStatic()) { Holder holder = new Holder(new PartitionColumns(Columns.from(row.columns()), Columns.NONE), BTree.empty(), deletionInfo, row, EncodingStats.NO_STATS); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); } else { Holder holder = new Holder(new PartitionColumns(Columns.NONE, Columns.from(row.columns())), BTree.singleton(row), deletionInfo, Rows.EMPTY_STATIC_ROW, EncodingStats.NO_STATS); return new PartitionUpdate(metadata, key, holder, deletionInfo, false); } }