StorageConfig.h

Go to the documentation of this file.
00001 /*
00002  *    Copyright 2004-2006 Intel Corporation
00003  * 
00004  *    Licensed under the Apache License, Version 2.0 (the "License");
00005  *    you may not use this file except in compliance with the License.
00006  *    You may obtain a copy of the License at
00007  * 
00008  *        http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  *    Unless required by applicable law or agreed to in writing, software
00011  *    distributed under the License is distributed on an "AS IS" BASIS,
00012  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *    See the License for the specific language governing permissions and
00014  *    limitations under the License.
00015  */
00016 
00017 #ifndef _OASYS_STORAGE_CONFIG_H_
00018 #define _OASYS_STORAGE_CONFIG_H_
00019 
00020 #include <string>
00021 #include "../debug/DebugUtils.h"
00022 
00023 namespace oasys {
00024 
00030 struct StorageConfig {
00031     // General options that must be set (in the constructor)
00032     std::string cmd_;           
00033     std::string type_;          
00034     std::string dbname_;        
00035     std::string dbdir_;         
00036 
00037     // Other general options
00038     bool        init_;          
00039     bool        tidy_;          
00040     int         tidy_wait_;     
00041     bool        leave_clean_file_;
00042 
00043     // Filesystem DB Specific options
00044     int         fs_fd_cache_size_; 
00045 
00046 
00047     // Berkeley DB Specific options
00048     bool        db_mpool_;      
00049     bool        db_log_;        
00050     bool        db_txn_;        
00051     int         db_max_tx_;     
00052     int         db_max_locks_;  
00053     int         db_max_lockers_;
00054     int         db_max_lockedobjs_;
00055     int         db_max_logregion_; 
00056     int         db_lockdetect_; 
00057 
00058     bool        db_sharefile_;  
00059 
00060     StorageConfig(
00061         const std::string& cmd,
00062         const std::string& type,
00063         const std::string& dbname,
00064         const std::string& dbdir)
00065         
00066       : cmd_(cmd),
00067         type_(type),
00068         dbname_(dbname),
00069         dbdir_(dbdir),
00070         
00071         init_(false),
00072         tidy_(false),
00073         tidy_wait_(3),
00074         leave_clean_file_(true),
00075 
00076         fs_fd_cache_size_(0),
00077 
00078         db_mpool_(true),
00079         db_log_(true),
00080         db_txn_(true),
00081         db_max_tx_(0),
00082         db_max_locks_(0),
00083         db_max_lockers_(0),
00084         db_max_lockedobjs_(0),
00085         db_max_logregion_(0),
00086         db_lockdetect_(5000),
00087         db_sharefile_(false)
00088     {}
00089 };
00090 
00091 } // namespace oasys
00092 
00093 #endif /* _STORAGE_CONFIG_H_ */

Generated on Thu Jun 7 16:56:52 2007 for DTN Reference Implementation by  doxygen 1.5.1