cache.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 
00037 #if !defined( _OESS_1__DB__STORAGE__IMPL__CACHE_HPP_ )
00038 #define _OESS_1__DB__STORAGE__IMPL__CACHE_HPP_
00039 
00040 #include <memory>
00041 
00042 #include <cpp_util_2/h/nocopy.hpp>
00043 
00044 #include <oess_1/db/storage/h/loaded_page.hpp>
00045 #include <oess_1/db/storage/h/dirty_page_storage.hpp>
00046 
00047 namespace oess_1 {
00048 
00049 namespace db {
00050 
00051 namespace storage {
00052 
00053 namespace impl {
00054 
00059 class cache_t
00060   : private cpp_util_2::nocopy_t
00061   {
00062   public :
00063     virtual ~cache_t();
00064 
00068     virtual void
00069     reinit(
00072       oess_1::uint_t cache_size,
00074       oess_1::uint_t page_size ) = 0;
00075 
00083     virtual void
00084     cleanup() = 0;
00085 
00091     virtual const oess_1::char_t *
00092     read_access(
00094       oess_1::uint_t ordinal ) = 0;
00095 
00103     virtual oess_1::char_t *
00104     write_access(
00106       oess_1::uint_t ordinal ) = 0;
00107 
00118     virtual oess_1::char_t *
00119     push(
00121       const ref_loaded_page_t & page,
00123       dirty_page_storage_t & storage,
00126       bool is_read_only_access ) = 0;
00127 
00138     virtual void
00139     copy_all_dirties(
00140       dirty_page_storage_t & storage ) = 0;
00141 
00150     virtual void
00151     clear_all_dirties() = 0;
00152 
00159     virtual void
00160     throw_away_all_dirties() = 0;
00161   };
00162 
00168 std::auto_ptr< cache_t >
00169 create_std_cache();
00170 
00171 } /* namespace impl */
00172 
00173 } /* namespace storage */
00174 
00175 } /* namespace db */
00176 
00177 } /* namespace oess_1 */
00178 
00179 #endif
00180 

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