private static int minDeletionTime(Cell cell) { return cell.isTombstone() ? Integer.MIN_VALUE : cell.localDeletionTime(); }
private static int minDeletionTime(Cell cell) { return cell.isTombstone() ? Integer.MIN_VALUE : cell.localDeletionTime(); }
private static int minDeletionTime(Cell cell) { return cell.isTombstone() ? Integer.MIN_VALUE : cell.localDeletionTime(); }
private static int minDeletionTime(Cell cell) { return cell.isTombstone() ? Integer.MIN_VALUE : cell.localDeletionTime(); }
public void update(Cell cell) { updateTimestamp(cell.timestamp()); if (cell.isExpiring()) { updateTTL(cell.ttl()); updateLocalDeletionTime(cell.localDeletionTime()); } else if (cell.isTombstone()) { updateLocalDeletionTime(cell.localDeletionTime()); } }
public void update(Cell cell) { updateTimestamp(cell.timestamp()); if (cell.isExpiring()) { updateTTL(cell.ttl()); updateLocalDeletionTime(cell.localDeletionTime()); } else if (cell.isTombstone()) { updateLocalDeletionTime(cell.localDeletionTime()); } }
public void update(Cell cell) { updateTimestamp(cell.timestamp()); if (cell.isExpiring()) { updateTTL(cell.ttl()); updateLocalDeletionTime(cell.localDeletionTime()); } else if (cell.isTombstone()) { updateLocalDeletionTime(cell.localDeletionTime()); } }
public void update(Cell cell) { updateTimestamp(cell.timestamp()); if (cell.isExpiring()) { updateTTL(cell.ttl()); updateLocalDeletionTime(cell.localDeletionTime()); } else if (cell.isTombstone()) { updateLocalDeletionTime(cell.localDeletionTime()); } }
public void validateCell(Cell cell) { if (cell.isTombstone()) { if (cell.value().hasRemaining()) throw new MarshalException("A tombstone should not have a value"); if (cell.path() != null) validateCellPath(cell.path()); } else if(type.isUDT()) { // To validate a non-frozen UDT field, both the path and the value // are needed, the path being an index into an array of value types. ((UserType)type).validateCell(cell); } else { type.validateCellValue(cell.value()); if (cell.path() != null) validateCellPath(cell.path()); } }
public void validateCell(Cell cell) { if (cell.isTombstone()) { if (cell.value().hasRemaining()) throw new MarshalException("A tombstone should not have a value"); if (cell.path() != null) validateCellPath(cell.path()); } else if(type.isUDT()) { // To validate a non-frozen UDT field, both the path and the value // are needed, the path being an index into an array of value types. ((UserType)type).validateCell(cell); } else { type.validateCellValue(cell.value()); if (cell.path() != null) validateCellPath(cell.path()); } }
public void validateCell(Cell cell) { if (cell.isTombstone()) { if (cell.value().hasRemaining()) throw new MarshalException("A tombstone should not have a value"); if (cell.path() != null) validateCellPath(cell.path()); } else if(type.isUDT()) { // To validate a non-frozen UDT field, both the path and the value // are needed, the path being an index into an array of value types. ((UserType)type).validateCell(cell); } else { type.validateCellValue(cell.value()); if (cell.path() != null) validateCellPath(cell.path()); } }
public void validateCell(Cell cell) { if (cell.isTombstone()) { if (cell.value().hasRemaining()) throw new MarshalException("A tombstone should not have a value"); if (cell.path() != null) validateCellPath(cell.path()); } else if(type.isUDT()) { // To validate a non-frozen UDT field, both the path and the value // are needed, the path being an index into an array of value types. ((UserType)type).validateCell(cell); } else { type.validateCellValue(cell.value()); if (cell.path() != null) validateCellPath(cell.path()); } }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
public long serializedSize(Cell cell, ColumnDefinition column, LivenessInfo rowLiveness, SerializationHeader header) { long size = 1; // flags boolean hasValue = cell.value().hasRemaining(); boolean isDeleted = cell.isTombstone(); boolean isExpiring = cell.isExpiring(); boolean useRowTimestamp = !rowLiveness.isEmpty() && cell.timestamp() == rowLiveness.timestamp(); boolean useRowTTL = isExpiring && rowLiveness.isExpiring() && cell.ttl() == rowLiveness.ttl() && cell.localDeletionTime() == rowLiveness.localExpirationTime(); if (!useRowTimestamp) size += header.timestampSerializedSize(cell.timestamp()); if ((isDeleted || isExpiring) && !useRowTTL) size += header.localDeletionTimeSerializedSize(cell.localDeletionTime()); if (isExpiring && !useRowTTL) size += header.ttlSerializedSize(cell.ttl()); if (column.isComplex()) size += column.cellPathSerializer().serializedSize(cell.path()); if (hasValue) size += header.getType(column).writtenLength(cell.value()); return size; }
public long serializedSize(Cell cell, ColumnDefinition column, LivenessInfo rowLiveness, SerializationHeader header) { long size = 1; // flags boolean hasValue = cell.value().hasRemaining(); boolean isDeleted = cell.isTombstone(); boolean isExpiring = cell.isExpiring(); boolean useRowTimestamp = !rowLiveness.isEmpty() && cell.timestamp() == rowLiveness.timestamp(); boolean useRowTTL = isExpiring && rowLiveness.isExpiring() && cell.ttl() == rowLiveness.ttl() && cell.localDeletionTime() == rowLiveness.localExpirationTime(); if (!useRowTimestamp) size += header.timestampSerializedSize(cell.timestamp()); if ((isDeleted || isExpiring) && !useRowTTL) size += header.localDeletionTimeSerializedSize(cell.localDeletionTime()); if (isExpiring && !useRowTTL) size += header.ttlSerializedSize(cell.ttl()); if (column.isComplex()) size += column.cellPathSerializer().serializedSize(cell.path()); if (hasValue) size += header.getType(column).writtenLength(cell.value()); return size; }
public long serializedSize(Cell cell, ColumnDefinition column, LivenessInfo rowLiveness, SerializationHeader header) { long size = 1; // flags boolean hasValue = cell.value().hasRemaining(); boolean isDeleted = cell.isTombstone(); boolean isExpiring = cell.isExpiring(); boolean useRowTimestamp = !rowLiveness.isEmpty() && cell.timestamp() == rowLiveness.timestamp(); boolean useRowTTL = isExpiring && rowLiveness.isExpiring() && cell.ttl() == rowLiveness.ttl() && cell.localDeletionTime() == rowLiveness.localExpirationTime(); if (!useRowTimestamp) size += header.timestampSerializedSize(cell.timestamp()); if ((isDeleted || isExpiring) && !useRowTTL) size += header.localDeletionTimeSerializedSize(cell.localDeletionTime()); if (isExpiring && !useRowTTL) size += header.ttlSerializedSize(cell.ttl()); if (column.isComplex()) size += column.cellPathSerializer().serializedSize(cell.path()); if (hasValue) size += header.getType(column).writtenLength(cell.value()); return size; }
public long serializedSize(Cell cell, ColumnDefinition column, LivenessInfo rowLiveness, SerializationHeader header) { long size = 1; // flags boolean hasValue = cell.value().hasRemaining(); boolean isDeleted = cell.isTombstone(); boolean isExpiring = cell.isExpiring(); boolean useRowTimestamp = !rowLiveness.isEmpty() && cell.timestamp() == rowLiveness.timestamp(); boolean useRowTTL = isExpiring && rowLiveness.isExpiring() && cell.ttl() == rowLiveness.ttl() && cell.localDeletionTime() == rowLiveness.localExpirationTime(); if (!useRowTimestamp) size += header.timestampSerializedSize(cell.timestamp()); if ((isDeleted || isExpiring) && !useRowTTL) size += header.localDeletionTimeSerializedSize(cell.localDeletionTime()); if (isExpiring && !useRowTTL) size += header.ttlSerializedSize(cell.ttl()); if (column.isComplex()) size += column.cellPathSerializer().serializedSize(cell.path()); if (hasValue) size += header.getType(column).writtenLength(cell.value()); return size; }