Revision b38874a0 include/LogDB.h

View differences:

include/LogDB.h
302 302
            time_t timestamp);
303 303
};
304 304

  
305
// -----------------------------------------------------------------------------
306
// This is a LogDB decoration, it replicates the DB write commands on slaves
307
// It should be passed as DB for federated pools.
308
// -----------------------------------------------------------------------------
309
class FedLogDB: public SqlDB
310
{
311
public:
312
    FedLogDB(LogDB *db):_logdb(db){};
313

  
314
    virtual ~FedLogDB(){};
315

  
316
    int exec_wr(ostringstream& cmd);
317

  
318
    int exec_local_wr(ostringstream& cmd)
319
    {
320
        return _logdb->exec_local_wr(cmd);
321
    }
322

  
323
    int exec_rd(ostringstream& cmd, Callbackable* obj)
324
    {
325
        return _logdb->exec_rd(cmd, obj);
326
    }
327

  
328
    char * escape_str(const string& str)
329
    {
330
        return _logdb->escape_str(str);
331
    }
332

  
333
    void free_str(char * str)
334
    {
335
        _logdb->free_str(str);
336
    }
337

  
338
    bool multiple_values_support()
339
    {
340
        return _logdb->multiple_values_support();
341
    }
342

  
343
protected:
344
    int exec(std::ostringstream& cmd, Callbackable* obj, bool quiet)
345
    {
346
        return -1;
347
    }
348

  
349
private:
350

  
351
    LogDB * _logdb;
352
}
353

  
305 354
#endif /*LOG_DB_H_*/
306 355

  

Also available in: Unified diff