Skip to content

Commit

Permalink
Remove unused Cassandra Counter.
Browse files Browse the repository at this point in the history
  • Loading branch information
wting committed Nov 28, 2016
1 parent 1a4dcb4 commit de071d9
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions r2/r2/lib/db/tdb_cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,35 +190,6 @@ def __init__(cls, name, bases, dct):
def __repr__(cls):
return '<thing: %s>' % cls.__name__

class Counter(object):
__metaclass__ = ThingMeta

_use_db = False
_connection_pool = 'main'
_extra_schema_creation_args = {
'default_validation_class': COUNTER_COLUMN_TYPE,
'replicate_on_write': True
}

_type_prefix = None
_cf_name = None
_compare_with = UTF8_TYPE

@classmethod
def _byID(cls, key):
return cls._cf.get(key)

@classmethod
@will_write
def _incr(cls, key, column, delta=1, super_column=None):
cls._cf.add(key, column, delta, super_column)

@classmethod
@will_write
def _incr_multi(cls, key, data):
with cls._cf.batch() as b:
b.insert(key, data)


class ThingBase(object):
# base class for Thing
Expand Down

0 comments on commit de071d9

Please sign in to comment.