@Override public String toString() { if (isCounterCell()) return String.format("[%s=%d ts=%d]", column().name, CounterContext.instance().total(value()), timestamp()); AbstractType<?> type = column().type; if (type instanceof CollectionType && type.isMultiCell()) { CollectionType ct = (CollectionType)type; return String.format("[%s[%s]=%s %s]", column().name, ct.nameComparator().getString(path().get(0)), ct.valueComparator().getString(value()), livenessInfoString()); } if (isTombstone()) return String.format("[%s=<tombstone> %s]", column().name, livenessInfoString()); else return String.format("[%s=%s %s]", column().name, type.getString(value()), livenessInfoString()); }
@Override public String toString() { if (isCounterCell()) return String.format("[%s=%d ts=%d]", column().name, CounterContext.instance().total(value()), timestamp()); AbstractType<?> type = column().type; if (type instanceof CollectionType && type.isMultiCell()) { CollectionType ct = (CollectionType)type; return String.format("[%s[%s]=%s %s]", column().name, ct.nameComparator().getString(path().get(0)), ct.valueComparator().getString(value()), livenessInfoString()); } if (isTombstone()) return String.format("[%s=<tombstone> %s]", column().name, livenessInfoString()); else return String.format("[%s=%s %s]", column().name, type.getString(value()), livenessInfoString()); }
@Override public String toString() { if (isCounterCell()) return String.format("[%s=%d ts=%d]", column().name, CounterContext.instance().total(value()), timestamp()); AbstractType<?> type = column().type; if (type instanceof CollectionType && type.isMultiCell()) { CollectionType ct = (CollectionType)type; return String.format("[%s[%s]=%s %s]", column().name, ct.nameComparator().getString(path().get(0)), ct.valueComparator().getString(value()), livenessInfoString()); } if (isTombstone()) return String.format("[%s=<tombstone> %s]", column().name, livenessInfoString()); else return String.format("[%s=%s %s]", column().name, type.getString(value()), livenessInfoString()); }
@Override public String toString() { if (isCounterCell()) return String.format("[%s=%d ts=%d]", column().name, CounterContext.instance().total(value()), timestamp()); AbstractType<?> type = column().type; if (type instanceof CollectionType && type.isMultiCell()) { CollectionType ct = (CollectionType)type; return String.format("[%s[%s]=%s %s]", column().name, ct.nameComparator().getString(path().get(0)), ct.valueComparator().getString(value()), livenessInfoString()); } if (isTombstone()) return String.format("[%s=<tombstone> %s]", column().name, livenessInfoString()); else return String.format("[%s=%s %s]", column().name, type.getString(value()), livenessInfoString()); }
@Override public int hashCode() { return Objects.hash(column(), isCounterCell(), timestamp(), ttl(), localDeletionTime(), value(), path()); }
@Override public int hashCode() { return Objects.hash(column(), isCounterCell(), timestamp(), ttl(), localDeletionTime(), value(), path()); }
@Override public int hashCode() { return Objects.hash(column(), isCounterCell(), timestamp(), ttl(), localDeletionTime(), value(), path()); }
@Override public int hashCode() { return Objects.hash(column(), isCounterCell(), timestamp(), ttl(), localDeletionTime(), value(), path()); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
public void validate() { if (ttl() < 0) throw new MarshalException("A TTL should not be negative"); if (localDeletionTime() < 0) throw new MarshalException("A local deletion time should not be negative"); if (isExpiring() && localDeletionTime() == NO_DELETION_TIME) throw new MarshalException("Shoud not have a TTL without an associated local deletion time"); // non-frozen UDTs require both the cell path & value to validate, // so that logic is pushed down into ColumnDefinition. Tombstone // validation is done there too as it also involves the cell path // for complex columns column().validateCell(this); }
public void validate() { if (ttl() < 0) throw new MarshalException("A TTL should not be negative"); if (localDeletionTime() < 0) throw new MarshalException("A local deletion time should not be negative"); if (isExpiring() && localDeletionTime() == NO_DELETION_TIME) throw new MarshalException("Shoud not have a TTL without an associated local deletion time"); // non-frozen UDTs require both the cell path & value to validate, // so that logic is pushed down into ColumnDefinition. Tombstone // validation is done there too as it also involves the cell path // for complex columns column().validateCell(this); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
public void validate() { if (ttl() < 0) throw new MarshalException("A TTL should not be negative"); if (localDeletionTime() < 0) throw new MarshalException("A local deletion time should not be negative"); if (isExpiring() && localDeletionTime() == NO_DELETION_TIME) throw new MarshalException("Shoud not have a TTL without an associated local deletion time"); // non-frozen UDTs require both the cell path & value to validate, // so that logic is pushed down into ColumnDefinition. Tombstone // validation is done there too as it also involves the cell path // for complex columns column().validateCell(this); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
public void validate() { if (ttl() < 0) throw new MarshalException("A TTL should not be negative"); if (localDeletionTime() < 0) throw new MarshalException("A local deletion time should not be negative"); if (isExpiring() && localDeletionTime() == NO_DELETION_TIME) throw new MarshalException("Shoud not have a TTL without an associated local deletion time"); // non-frozen UDTs require both the cell path & value to validate, // so that logic is pushed down into ColumnDefinition. Tombstone // validation is done there too as it also involves the cell path // for complex columns column().validateCell(this); }