@Override protected void addColumn(Cell cell) throws IOException { super.addColumn(cell); countColumn(cell); }
/** * Insert a new "regular" column to the current row (and super column if applicable). * @param name the column name * @param value the column value * @param timestamp the column timestamp */ public void addColumn(ByteBuffer name, ByteBuffer value, long timestamp) throws IOException { addColumn(new BufferCell(metadata.comparator.cellFromByteBuffer(name), value, timestamp)); }
/** * Insert a new expiring column to the current row (and super column if applicable). * @param name the column name * @param value the column value * @param timestamp the column timestamp * @param ttl the column time to live in seconds * @param expirationTimestampMS the local expiration timestamp in milliseconds. This is the server time timestamp used for actually * expiring the column, and as a consequence should be synchronized with the cassandra servers time. If {@code timestamp} represents * the insertion time in microseconds (which is not required), this should be {@code (timestamp / 1000) + (ttl * 1000)}. */ public void addExpiringColumn(ByteBuffer name, ByteBuffer value, long timestamp, int ttl, long expirationTimestampMS) throws IOException { addColumn(new BufferExpiringCell(metadata.comparator.cellFromByteBuffer(name), value, timestamp, ttl, (int)(expirationTimestampMS / 1000))); }
/** * Insert a new counter column to the current row (and super column if applicable). * @param name the column name * @param value the value of the counter */ public void addCounterColumn(ByteBuffer name, long value) throws IOException { addColumn(new BufferCounterCell(metadata.comparator.cellFromByteBuffer(name), CounterContext.instance().createGlobal(counterid, 1L, value), System.currentTimeMillis())); }