Drizzled Public API Documentation

parameters_ms.h

00001 /* Copyright (C) 2010 PrimeBase Technologies GmbH, Germany
00002  *
00003  * PrimeBase Media Stream for MySQL
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018  *
00019  * Barry Leslie
00020  *
00021  * 2010-05-25
00022  *
00023  * PBMS daemon global parameters.
00024  *
00025  */
00026 
00027 #pragma once
00028 #ifndef __PARAMETERS_MS_H__
00029 #define __PARAMETERS_MS_H__
00030 
00031 #ifdef DRIZZLED
00032 namespace drizzled { namespace module {
00033 class Context;
00034 class option_context;
00035 }}
00036 #endif
00037 
00038 class PBMSParameters {
00039   public:
00040 #ifdef DRIZZLED
00041         static void startUp(drizzled::module::Context &context);
00042 
00043         static void initOptions(drizzled::module::option_context &context);
00044   
00045 #else 
00046         static void startUp();
00047 
00048 #endif
00049   static void shutDown(){}
00050 
00051   static uint32_t getPortNumber();
00052 
00053   static uint32_t getServerID();
00054   
00055   static uint64_t getRepoThreshold();
00056 
00057   static uint64_t getTempLogThreshold();
00058   
00059   static uint32_t getTempBlobTimeout();
00060   
00061   static uint32_t getGarbageThreshold();
00062   
00063   static uint32_t getMaxKeepAlive();
00064   
00065   static uint32_t getBackupDatabaseID();
00066   static void setBackupDatabaseID(uint32_t id);
00067   
00068   static const char *getDefaultMetaDataHeaders();
00069   
00070 #ifdef DRIZZLED
00071   static void blackListedDB(const char *db);
00072 
00073   static bool isBlackListedDB(const char *db);
00074   
00075   static bool isBLOBDatabase(const char *db);
00076   
00077   static bool isBLOBTable(const char *db, const char *table);
00078 
00079   static bool isPBMSEventsEnabled();
00080   
00081   static int32_t getBeforeUptateEventPosition();
00082   
00083   static int32_t getBeforeInsertEventPosition();  
00084   
00085   private:
00086   static bool try_LocateDB(CSThread *self, const char *db, bool *found);
00087   static bool try_LocateTable(CSThread *self, const char *db, const char *table, bool *found);
00088 
00089 #endif
00090 };
00091 
00092 #endif // __PARAMETERS_MS_H__