<s> from abc import abstractmethod , ABCMeta <EOL> class BaseStreamConsumer ( object ) : <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def get_messages ( self , timeout = <NUM_LIT:0.1> , count = <NUM_LIT:1> ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def get_offset ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> class BaseStreamProducer ( object ) : <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def send ( self , key , * messages ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def flush ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def get_offset ( self , partition_id ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> class BaseSpiderLogStream ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def producer ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def consumer ( self , partition_id , type ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> class BaseScoringLogStream ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def consumer ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def producer ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> class BaseSpiderFeedStream ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def consumer ( self , partition_id ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def producer ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def available_partitions ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def mark_ready ( self , partition_id ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def mark_busy ( self , partition_id ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class BaseMessageBus ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = ABCMeta <EOL> @ abstractmethod <EOL> def scoring_log ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def spider_log ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def spider_feed ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError </s>
