@@ -0,0 +1,3188 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.cassandra.db;%0A%0Aimport java.nio.ByteBuffer;%0A%0Aimport org.apache.cassandra.db.context.CounterContext;%0Aimport org.apache.cassandra.utils.ByteBufferUtil;%0A%0A/**%0A * A counter update while it hasn't been applied yet by the leader replica.%0A *%0A * Contains a single counter update. When applied by the leader replica, this%0A * is transformed to a relevant CounterColumn. This Column is a temporary data%0A * structure that should never be stored inside a memtable or an sstable.%0A */%0Apublic class CounterUpdateColumn extends Column%0A%7B%0A    public CounterUpdateColumn(ByteBuffer name, long value, long timestamp)%0A    %7B%0A        this(name, ByteBufferUtil.bytes(value), timestamp);%0A    %7D%0A%0A    public CounterUpdateColumn(ByteBuffer name, ByteBuffer value, long timestamp)%0A    %7B%0A        super(name, value, timestamp);%0A    %7D%0A%0A    public CounterColumn asCounterColumn()%0A    %7B%0A        return new CounterColumn(%0A                ByteBufferUtil.clone(name()),%0A                CounterContext.instance().create(delta()),%0A                timestamp(),%0A                Long.MIN_VALUE);%0A    %7D%0A%0A    public long delta()%0A    %7B%0A        return value().getLong(value().position());%0A    %7D%0A%0A    @Override%0A    public IColumn diff(IColumn column)%0A    %7B%0A        // Diff is used during reads, but we should never read those columns%0A        throw new UnsupportedOperationException(%22This operation is unsupported on CounterUpdateColumn.%22);%0A    %7D%0A%0A    @Override%0A    public IColumn reconcile(IColumn column)%0A    %7B%0A        // The only time this could happen is if a batchAdd ships two%0A        // increment for the same column. Hence we simply sums the delta.%0A%0A        assert (column instanceof CounterUpdateColumn) %7C%7C (column instanceof DeletedColumn) : %22Wrong class type.%22;%0A%0A        // tombstones take precedence%0A        if (column.isMarkedForDelete())%0A            return timestamp() %3E column.timestamp() ? this : column;%0A%0A        // neither is tombstoned%0A        CounterUpdateColumn c = (CounterUpdateColumn)column;%0A        return new CounterUpdateColumn(name(), delta() + c.delta(), Math.max(timestamp(), c.timestamp()));%0A    %7D%0A%0A    @Override%0A    public int serializationFlags()%0A    %7B%0A        return ColumnSerializer.COUNTER_UPDATE_MASK;%0A    %7D%0A%0A    @Override%0A    public IColumn deepCopy()%0A    %7B%0A        return new CounterUpdateColumn(ByteBufferUtil.clone(name), ByteBufferUtil.clone(value), timestamp);%0A    %7D%0A%7D%0A

add missing CounterUpdateColumn.java