Sha256: 58a58f6f4f021f861a86fa9410dfc4fb862aee16fae24e0b7c4001fa43dae6a2

Contents?: true

Size: 298 Bytes

Versions: 12

Compression:

Stored size: 298 Bytes

Contents

module Riak
  module Crdt
    class BatchCounter
      attr_reader :accumulator

      def initialize
        @accumulator = 0
      end

      def increment(amount = 1)
        @accumulator += amount
      end

      def decrement(amount = 1)
        increment -amount
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
riak-client-2.6.0 lib/riak/crdt/batch_counter.rb
riak-client-2.5.0 lib/riak/crdt/batch_counter.rb
riak-client-2.4.1 lib/riak/crdt/batch_counter.rb
riak-client-2.4.0 lib/riak/crdt/batch_counter.rb
riak-client-2.4.0.pre1 lib/riak/crdt/batch_counter.rb
riak-client-2.3.2 lib/riak/crdt/batch_counter.rb
riak-client-2.3.1 lib/riak/crdt/batch_counter.rb
riak-client-2.3.0 lib/riak/crdt/batch_counter.rb
riak-client-2.2.2 lib/riak/crdt/batch_counter.rb
riak-client-2.2.1 lib/riak/crdt/batch_counter.rb
riak-client-noenc-1.0.0 lib/riak/crdt/batch_counter.rb
riak-client-2.2.0 lib/riak/crdt/batch_counter.rb