StorageCommand.cc

Go to the documentation of this file.
00001 /*
00002  * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
00003  * downloading, copying, installing or using the software you agree to
00004  * this license. If you do not agree to this license, do not download,
00005  * install, copy or use the software.
00006  * 
00007  * Intel Open Source License 
00008  * 
00009  * Copyright (c) 2004 Intel Corporation. All rights reserved. 
00010  * 
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions are
00013  * met:
00014  * 
00015  *   Redistributions of source code must retain the above copyright
00016  *   notice, this list of conditions and the following disclaimer.
00017  * 
00018  *   Redistributions in binary form must reproduce the above copyright
00019  *   notice, this list of conditions and the following disclaimer in the
00020  *   documentation and/or other materials provided with the distribution.
00021  * 
00022  *   Neither the name of the Intel Corporation nor the names of its
00023  *   contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *  
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00027  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00028  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00029  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
00030  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00031  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00032  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00033  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00034  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00035  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037  */
00038 
00039 #include <oasys/storage/StorageConfig.h>
00040 
00041 #include "StorageCommand.h"
00042 #include "bundling/BundlePayload.h"
00043 
00044 namespace dtn {
00045 
00046 StorageCommand::StorageCommand(oasys::StorageConfig* cfg)
00047     : TclCommand(cfg->cmd_.c_str())
00048 {
00049     inited_ = false;
00050     
00051     bind_s("type",      &cfg->type_, "What storage system to use.");
00052     bind_b("tidy",      &cfg->tidy_, "Same as the --tidy argument to dtnd.");
00053     bind_b("init_db",   &cfg->init_, "Same as the --init-db argument to dtnd.");
00054     bind_i("tidy_wait", &cfg->tidy_wait_,
00055            "How long to wait before really doing the tidy operation.");
00056     bind_s("dbname",    &cfg->dbname_, "The database name.");
00057     bind_s("dbdir",     &cfg->dbdir_,  "The database directory.");
00058     bind_s("payloaddir",&BundlePayload::payloaddir_,
00059         "directory for payloads while in transit");
00060 
00061     bind_i("fs_fd_cache_size", &cfg->fs_fd_cache_size_, 
00062            "number of open fds to cache");
00063 
00064     bind_b("db_mpool", &cfg->db_mpool_, "use mpool in Berkeley DB");
00065     bind_b("db_log", &cfg->db_log_, "use logging in Berkeley DB");
00066     bind_b("db_txn", &cfg->db_txn_, "use transactions in Berkeley DB");
00067     bind_b("db_sharefile", &cfg->db_sharefile_, "use shared database file");
00068     bind_i("db_max_tx",   &cfg->db_max_tx_,
00069            "max # of active transactions in Berkeley DB");
00070     bind_i("db_max_locks", &cfg->db_max_locks_,
00071            "max # of active locks in Berkeley DB");
00072     bind_i("db_max_lockers", &cfg->db_max_lockers_,
00073            "max # of active locking threads in Berkeley DB");
00074     bind_i("db_max_lockedobjs", &cfg->db_max_lockedobjs_,
00075            "max # of active locked objects in Berkeley DB");
00076     bind_i("db_lockdetect",   &cfg->db_lockdetect_,
00077            "frequency to check for Berkeley DB deadlocks (zero disables locking)");
00078 }
00079 
00080 } // namespace dtn

Generated on Fri Dec 22 14:48:00 2006 for DTN Reference Implementation by  doxygen 1.5.1