def __init__(self, host, bucket, record_type, keygen_function, **kwargs): DataRelay.__init__(self, **kwargs) self._record_type = record_type couchbase_server = cbx.CouchbaseServer(host) self._couchbase_mgr = cbx.CouchbasePersistenceManager( couchbase_server, bucket) self._couchbase_mgr.register_keygen_function(self._record_type, keygen_function)
def __init__(self, logger, **kwargs): couchbase_host = kwargs['hostname'] self.bucket_name = kwargs['bucket_name'] self.logger = logger self.logger.info('couchbase host is: %s' % couchbase_host) self.logger.info('couchbase bucket is: %s' % self.bucket_name) self.couchbase_db = cdb.CouchbaseServer(couchbase_host) self.cpmgr = cdb.CouchbasePersistenceManager(self.couchbase_db, self.bucket_name) self.bucket = self.couchbase_db.get_bucket(self.bucket_name)
def __init__(self, **kwargs): self.host = kwargs['host'] self.data_bucket_name = kwargs['data_bucket_name'] self.journal_bucket_name = kwargs['journal_bucket_name'] self.cache_bucket_name = kwargs['cache_bucket_name'] self.couchbase_server = cbx.CouchbaseServer(self.host) self.data_manager = cbx.CouchbasePersistenceManager( self.couchbase_server, self.data_bucket_name) self.journal_manager = cbx.CouchbasePersistenceManager( self.couchbase_server, self.journal_bucket_name) self.cache_manager = cbx.CouchbasePersistenceManager( self.couchbase_server, self.cache_bucket_name)