stream_storage.hpp

См. документацию.
00001 /*
00002 
00003 Copyright (c) 2002-2005, Yauheni Akhotnikau
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008 
00009 - Redistributions of source code must retain the above copyright notice, this
00010 list of conditions and the following disclaimer.
00011 
00012 - Redistributions in binary form must reproduce the above copyright notice, this
00013 list of conditions and the following disclaimer in the documentation and/or
00014 other materials provided with the distribution.
00015 
00016 - The name of the author may not be used to endorse or promote products derived
00017 from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00020 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00021 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00022 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00024 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00027 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00028 OF SUCH DAMAGE.
00029 
00030 */
00031 
00036 #if !defined( _OESS_1__DB__STORAGE__STREAM_STORAGE_HPP_ )
00037 #define _OESS_1__DB__STORAGE__STREAM_STORAGE_HPP_
00038 
00039 #include <set>
00040 
00041 #include <cpp_util_2/h/nocopy.hpp>
00042 
00043 #include <oess_1/db/h/declspec.hpp>
00044 
00045 #include <oess_1/db/storage/h/chain_storage.hpp>
00046 #include <oess_1/db/storage/h/entity_stream.hpp>
00047 
00048 namespace oess_1 {
00049 
00050 namespace db {
00051 
00052 namespace storage {
00053 
00054 /*
00055 ** stream_storage_t
00056 */
00057 
00061 class OESS_1__DB__TYPE  stream_storage_t
00062   : private cpp_util_2::nocopy_t
00063   {
00064   public :
00065     virtual ~stream_storage_t();
00066 
00070     virtual void
00071     trans_start() = 0;
00072 
00076     virtual void
00077     trans_commit() = 0;
00078 
00084     virtual void
00085     trans_rollback() = 0;
00087 
00090 
00092 
00095     virtual void 
00096     stream_create(
00098       const std::string & name ) = 0;
00099 
00101 
00104     virtual bool
00105     stream_is_exists(
00107       const std::string & name ) const = 0;
00108 
00110 
00115     virtual void
00116     stream_destroy(
00117       const std::string & name ) = 0;
00118 
00120     virtual std::set< std::string >
00121     stream_names() const = 0;
00122 
00124 
00134     virtual entity_stream_t &
00135     stream_get(
00137       const std::string & name ) = 0;
00138 
00140 
00150     virtual entity_stream_t &
00151     stream_get(
00153       const oess_1::uint_t & id ) = 0;
00155 
00158 
00166     virtual chain_storage_t &
00167     chain_storage() = 0;
00169 };
00170 
00171 //
00172 // create_stream_storage
00173 //
00174 
00189 OESS_1__DB__FUNC(stream_storage_t *)
00190 create_stream_storage(
00192   const std::string & physic_name,
00194   const config_t & config );
00195 
00196 //
00197 // open_stream_storage
00198 //
00199 
00214 OESS_1__DB__FUNC(stream_storage_t *)
00215 open_stream_storage(
00217   const std::string & physic_name,
00219   const config_t & config,
00221   bool is_read_only,
00223   bool is_auto_repair_enabled );
00224 
00225 //
00226 // is_stream_storage_exists
00227 //
00228 
00237 OESS_1__DB__FUNC(bool)
00238 is_stream_storage_exists(
00240   const std::string & physic_name );
00241 
00242 //
00243 // destroy_stream_storage
00244 //
00245 
00253 OESS_1__DB__FUNC(void)
00254 destroy_stream_storage(
00256   const std::string & physic_name );
00257 
00258 } /* namespace storage */
00259 
00260 } /* namespace db */
00261 
00262 } /* namespace oess_1 */
00263 
00264 #endif

Документация по ObjESSty. Последние изменения: Fri Oct 13 18:35:35 2006. Создано системой  doxygen 1.4.7
Hosted by uCoz