Back to index

lightning-sunbird  0.9+nobinonly
orkinStore.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-  */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1999
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef _ORKINSTORE_
00039 #define _ORKINSTORE_ 1
00040 
00041 #ifndef _MDB_
00042 #include "mdb.h"
00043 #endif
00044 
00045 #ifndef _MORK_
00046 #include "mork.h"
00047 #endif
00048 
00049 #ifndef _MORKNODE_
00050 #include "morkNode.h"
00051 #endif
00052 
00053 #ifndef _MORKHANDLE_
00054 #include "morkHandle.h"
00055 #endif
00056 
00057 #ifndef _MORKStore_
00058 #include "morkStore.h"
00059 #endif
00060 
00061 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
00062 
00063 #define morkMagic_kStore 0x53746F72 /* ascii 'Stor' */
00064  
00065 /*| orkinStore: 
00066 |*/
00067 class orkinStore : public morkHandle, public nsIMdbStore { // nsIMdbPort
00068 
00069 // { ===== begin morkNode interface =====
00070 public: // morkNode virtual methods
00071   // virtual void CloseMorkNode(morkEnv* ev); // morkHandle is fine
00072   virtual ~orkinStore(); // morkHandle destructor does everything
00073   
00074 protected: // construction is protected (use the static Make() method)
00075   orkinStore(morkEnv* ev, // note morkUsage is always morkUsage_kPool
00076     morkHandleFace* ioFace,    // must not be nil, cookie for this handle
00077     morkStore* ioObject); // must not be nil, the object for this handle
00078     
00079   // void CloseHandle(morkEnv* ev); // don't need to specialize closing
00080 
00081 private: // copying is not allowed
00082   orkinStore(const morkHandle& other);
00083   orkinStore& operator=(const morkHandle& other);
00084 
00085 // public: // dynamic type identification
00086   // mork_bool IsHandle() const //
00087   // { return IsNode() && mNode_Derived == morkDerived_kHandle; }
00088 // } ===== end morkNode methods =====
00089 
00090 protected: // morkHandle memory management operators
00091   void* operator new(size_t inSize, morkPool& ioPool, morkZone& ioZone, morkEnv* ev) CPP_THROW_NEW
00092   { return ioPool.NewHandle(ev, inSize, &ioZone); }
00093   
00094   void* operator new(size_t inSize, morkPool& ioPool, morkEnv* ev) CPP_THROW_NEW
00095   { return ioPool.NewHandle(ev, inSize, (morkZone*) 0); }
00096   
00097   void* operator new(size_t inSize, morkHandleFace* ioFace) CPP_THROW_NEW
00098   { MORK_USED_1(inSize); return ioFace; }
00099   
00100  
00101 public: // construction:
00102 
00103   static orkinStore* MakeStore(morkEnv* ev, morkStore* ioObject);
00104 
00105 public: // utilities:
00106 
00107   morkEnv* CanUseStore(nsIMdbEnv* mev, mork_bool inMutable,
00108     mdb_err* outErr) const;
00109 
00110 public: // type identification
00111   mork_bool IsOrkinStore() const
00112   { return mHandle_Magic == morkMagic_kStore; }
00113 
00114   mork_bool IsOrkinStoreHandle() const
00115   { return this->IsHandle() && this->IsOrkinStore(); }
00116 
00117   NS_DECL_ISUPPORTS
00118 // { ===== begin nsIMdbObject methods =====
00119 
00120   // { ----- begin attribute methods -----
00121   NS_IMETHOD IsFrozenMdbObject(nsIMdbEnv* ev, mdb_bool* outIsReadonly);
00122   // same as nsIMdbPort::GetIsPortReadonly() when this object is inside a port.
00123   // } ----- end attribute methods -----
00124 
00125   // { ----- begin factory methods -----
00126   NS_IMETHOD GetMdbFactory(nsIMdbEnv* ev, nsIMdbFactory** acqFactory); 
00127   // } ----- end factory methods -----
00128 
00129   // { ----- begin ref counting for well-behaved cyclic graphs -----
00130   NS_IMETHOD GetWeakRefCount(nsIMdbEnv* ev, // weak refs
00131     mdb_count* outCount);  
00132   NS_IMETHOD GetStrongRefCount(nsIMdbEnv* ev, // strong refs
00133     mdb_count* outCount);
00134 
00135   NS_IMETHOD AddWeakRef(nsIMdbEnv* ev);
00136   NS_IMETHOD AddStrongRef(nsIMdbEnv* ev);
00137 
00138   NS_IMETHOD CutWeakRef(nsIMdbEnv* ev);
00139   NS_IMETHOD CutStrongRef(nsIMdbEnv* ev);
00140   
00141   NS_IMETHOD CloseMdbObject(nsIMdbEnv* ev); // called at strong refs zero
00142   NS_IMETHOD IsOpenMdbObject(nsIMdbEnv* ev, mdb_bool* outOpen);
00143   // } ----- end ref counting -----
00144   
00145 // } ===== end nsIMdbObject methods =====
00146 
00147 // { ===== begin nsIMdbPort methods =====
00148 
00149   // { ----- begin attribute methods -----
00150   NS_IMETHOD GetIsPortReadonly(nsIMdbEnv* ev, mdb_bool* outBool);
00151   NS_IMETHOD GetIsStore(nsIMdbEnv* ev, mdb_bool* outBool);
00152   NS_IMETHOD GetIsStoreAndDirty(nsIMdbEnv* ev, mdb_bool* outBool);
00153 
00154   NS_IMETHOD GetUsagePolicy(nsIMdbEnv* ev, 
00155     mdbUsagePolicy* ioUsagePolicy);
00156 
00157   NS_IMETHOD SetUsagePolicy(nsIMdbEnv* ev, 
00158     const mdbUsagePolicy* inUsagePolicy);
00159   // } ----- end attribute methods -----
00160 
00161   // { ----- begin memory policy methods -----  
00162   NS_IMETHOD IdleMemoryPurge( // do memory management already scheduled
00163     nsIMdbEnv* ev, // context
00164     mdb_size* outEstimatedBytesFreed); // approximate bytes actually freed
00165 
00166   NS_IMETHOD SessionMemoryPurge( // request specific footprint decrease
00167     nsIMdbEnv* ev, // context
00168     mdb_size inDesiredBytesFreed, // approximate number of bytes wanted
00169     mdb_size* outEstimatedBytesFreed); // approximate bytes actually freed
00170 
00171   NS_IMETHOD PanicMemoryPurge( // desperately free all possible memory
00172     nsIMdbEnv* ev, // context
00173     mdb_size* outEstimatedBytesFreed); // approximate bytes actually freed
00174   // } ----- end memory policy methods -----
00175 
00176   // { ----- begin filepath methods -----
00177   NS_IMETHOD GetPortFilePath(
00178     nsIMdbEnv* ev, // context
00179     mdbYarn* outFilePath, // name of file holding port content
00180     mdbYarn* outFormatVersion); // file format description
00181 
00182   NS_IMETHOD GetPortFile(
00183     nsIMdbEnv* ev, // context
00184     nsIMdbFile** acqFile); // acquire file used by port or store
00185   // } ----- end filepath methods -----
00186 
00187   // { ----- begin export methods -----
00188   NS_IMETHOD BestExportFormat( // determine preferred export format
00189     nsIMdbEnv* ev, // context
00190     mdbYarn* outFormatVersion); // file format description
00191 
00192   NS_IMETHOD
00193   CanExportToFormat( // can export content in given specific format?
00194     nsIMdbEnv* ev, // context
00195     const char* inFormatVersion, // file format description
00196     mdb_bool* outCanExport); // whether ExportSource() might succeed
00197 
00198   NS_IMETHOD ExportToFormat( // export content in given specific format
00199     nsIMdbEnv* ev, // context
00200     // const char* inFilePath, // the file to receive exported content
00201     nsIMdbFile* ioFile, // destination abstract file interface
00202     const char* inFormatVersion, // file format description
00203     nsIMdbThumb** acqThumb); // acquire thumb for incremental export
00204   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00205   // then the export will be finished.
00206 
00207   // } ----- end export methods -----
00208 
00209   // { ----- begin token methods -----
00210   NS_IMETHOD TokenToString( // return a string name for an integer token
00211     nsIMdbEnv* ev, // context
00212     mdb_token inToken, // token for inTokenName inside this port
00213     mdbYarn* outTokenName); // the type of table to access
00214   
00215   NS_IMETHOD StringToToken( // return an integer token for scope name
00216     nsIMdbEnv* ev, // context
00217     const char* inTokenName, // Latin1 string to tokenize if possible
00218     mdb_token* outToken); // token for inTokenName inside this port
00219     
00220   // String token zero is never used and never supported. If the port
00221   // is a mutable store, then StringToToken() to create a new
00222   // association of inTokenName with a new integer token if possible.
00223   // But a readonly port will return zero for an unknown scope name.
00224 
00225   NS_IMETHOD QueryToken( // like StringToToken(), but without adding
00226     nsIMdbEnv* ev, // context
00227     const char* inTokenName, // Latin1 string to tokenize if possible
00228     mdb_token* outToken); // token for inTokenName inside this port
00229   
00230   // QueryToken() will return a string token if one already exists,
00231   // but unlike StringToToken(), will not assign a new token if not
00232   // already in use.
00233 
00234   // } ----- end token methods -----
00235 
00236   // { ----- begin row methods -----  
00237   NS_IMETHOD HasRow( // contains a row with the specified oid?
00238     nsIMdbEnv* ev, // context
00239     const mdbOid* inOid,  // hypothetical row oid
00240     mdb_bool* outHasRow); // whether GetRow() might succeed
00241 
00242   NS_IMETHOD GetRowRefCount( // get number of tables that contain a row 
00243     nsIMdbEnv* ev, // context
00244     const mdbOid* inOid,  // hypothetical row oid
00245     mdb_count* outRefCount); // number of tables containing inRowKey 
00246     
00247   NS_IMETHOD GetRow( // access one row with specific oid
00248     nsIMdbEnv* ev, // context
00249     const mdbOid* inOid,  // hypothetical row oid
00250     nsIMdbRow** acqRow); // acquire specific row (or null)
00251 
00252   NS_IMETHOD FindRow(nsIMdbEnv* ev, // search for row with matching cell
00253     mdb_scope inRowScope,   // row scope for row ids
00254     mdb_column inColumn,   // the column to search (and maintain an index)
00255     const mdbYarn* inTargetCellValue, // cell value for which to search
00256     mdbOid* outRowOid, // out row oid on match (or {0,-1} for no match)
00257     nsIMdbRow** acqRow); // acquire matching row (or nil for no match)
00258   // FindRow() searches for one row that has a cell in column inColumn with
00259   // a contained value with the same form (i.e. charset) and is byte-wise
00260   // identical to the blob described by yarn inTargetCellValue.  Both content
00261   // and form of the yarn must be an exact match to find a matching row.
00262   //
00263   // (In other words, both a yarn's blob bytes and form are significant.  The
00264   // form is not expected to vary in columns used for identity anyway.  This
00265   // is intended to make the cost of FindRow() cheaper for MDB implementors,
00266   // since any cell value atomization performed internally must necessarily
00267   // make yarn form significant in order to avoid data loss in atomization.)
00268   //
00269   // FindRow() can lazily create an index on attribute inColumn for all rows
00270   // with that attribute in row space scope inRowScope, so that subsequent
00271   // calls to FindRow() will perform faster.  Such an index might or might
00272   // not be persistent (but this seems desirable if it is cheap to do so).
00273   // Note that lazy index creation in readonly DBs is not very feasible.
00274   //
00275   // This FindRow() interface assumes that attribute inColumn is effectively
00276   // an alternative means of unique identification for a row in a rowspace,
00277   // so correct behavior is only guaranteed when no duplicates for this col
00278   // appear in the given set of rows.  (If more than one row has the same cell
00279   // value in this column, no more than one will be found; and cutting one of
00280   // two duplicate rows can cause the index to assume no other such row lives
00281   // in the row space, so future calls return nil for negative search results
00282   // even though some duplicate row might still live within the rowspace.)
00283   //
00284   // In other words, the FindRow() implementation is allowed to assume simple
00285   // hash tables mapping unqiue column keys to associated row values will be
00286   // sufficient, where any duplication is not recorded because only one copy
00287   // of a given key need be remembered.  Implementors are not required to sort
00288   // all rows by the specified column.
00289   // } ----- end row methods -----
00290 
00291   // { ----- begin table methods -----  
00292   NS_IMETHOD HasTable( // supports a table with the specified oid?
00293     nsIMdbEnv* ev, // context
00294     const mdbOid* inOid,  // hypothetical table oid
00295     mdb_bool* outHasTable); // whether GetTable() might succeed
00296     
00297   NS_IMETHOD GetTable( // access one table with specific oid
00298     nsIMdbEnv* ev, // context
00299     const mdbOid* inOid,  // hypothetical table oid
00300     nsIMdbTable** acqTable); // acquire specific table (or null)
00301   
00302   NS_IMETHOD HasTableKind( // supports a table of the specified type?
00303     nsIMdbEnv* ev, // context
00304     mdb_scope inRowScope, // rid scope for row ids
00305     mdb_kind inTableKind, // the type of table to access
00306     mdb_count* outTableCount, // current number of such tables
00307     mdb_bool* outSupportsTable); // whether GetTableKind() might succeed
00308         
00309   NS_IMETHOD GetTableKind( // access one (random) table of specific type
00310     nsIMdbEnv* ev, // context
00311     mdb_scope inRowScope,      // row scope for row ids
00312     mdb_kind inTableKind,      // the type of table to access
00313     mdb_count* outTableCount, // current number of such tables
00314     mdb_bool* outMustBeUnique, // whether port can hold only one of these
00315     nsIMdbTable** acqTable);       // acquire scoped collection of rows
00316     
00317   NS_IMETHOD
00318   GetPortTableCursor( // get cursor for all tables of specific type
00319     nsIMdbEnv* ev, // context
00320     mdb_scope inRowScope, // row scope for row ids
00321     mdb_kind inTableKind, // the type of table to access
00322     nsIMdbPortTableCursor** acqCursor); // all such tables in the port
00323   // } ----- end table methods -----
00324 
00325 
00326   // { ----- begin commit methods -----
00327 
00328   NS_IMETHOD ShouldCompress( // store wastes at least inPercentWaste?
00329     nsIMdbEnv* ev, // context
00330     mdb_percent inPercentWaste, // 0..100 percent file size waste threshold
00331     mdb_percent* outActualWaste, // 0..100 percent of file actually wasted
00332     mdb_bool* outShould); // true when about inPercentWaste% is wasted
00333   // ShouldCompress() returns true if the store can determine that the file
00334   // will shrink by an estimated percentage of inPercentWaste% (or more) if
00335   // CompressCommit() is called, because that percentage of the file seems
00336   // to be recoverable free space.  The granularity is only in terms of 
00337   // percentage points, and any value over 100 is considered equal to 100.
00338   //
00339   // If a store only has an approximate idea how much space might be saved
00340   // during a compress, then a best guess should be made.  For example, the
00341   // Mork implementation might keep track of how much file space began with
00342   // text content before the first updating transaction, and then consider
00343   // all content following the start of the first transaction as potentially
00344   // wasted space if it is all updates and not just new content.  (This is
00345   // a safe assumption in the sense that behavior will stabilize on a low
00346   // estimate of wastage after a commit removes all transaction updates.)
00347   //
00348   // Some db formats might attempt to keep a very accurate reckoning of free
00349   // space size, so a very accurate determination can be made.  But other db
00350   // formats might have difficulty determining size of free space, and might
00351   // require some lengthy calculation to answer.  This is the reason for
00352   // passing in the percentage threshold of interest, so that such lengthy
00353   // computations can terminate early as soon as at least inPercentWaste is
00354   // found, so that the entire file need not be groveled when unnecessary.
00355   // However, we hope implementations will always favor fast but imprecise
00356   // heuristic answers instead of extremely slow but very precise answers.
00357   //
00358   // If the outActualWaste parameter is non-nil, it will be used to return
00359   // the actual estimated space wasted as a percentage of file size.  (This
00360   // parameter is provided so callers need not call repeatedly with altered
00361   // inPercentWaste values to isolate the actual wastage figure.)  Note the
00362   // actual wastage figure returned can exactly equal inPercentWaste even
00363   // when this grossly underestimates the real figure involved, if the db
00364   // finds it very expensive to determine the extent of wastage after it is
00365   // known to at least exceed inPercentWaste.  Note we expect that whenever
00366   // outShould returns true, that outActualWaste returns >= inPercentWaste.
00367   //
00368   // The effect of different inPercentWaste values is not very uniform over
00369   // the permitted range.  For example, 50 represents 50% wastage, or a file
00370   // that is about double what it should be ideally.  But 99 represents 99%
00371   // wastage, or a file that is about ninety-nine times as big as it should
00372   // be ideally.  In the smaller direction, 25 represents 25% wastage, or
00373   // a file that is only 33% larger than it should be ideally.
00374   //
00375   // Callers can determine what policy they want to use for considering when
00376   // a file holds too much wasted space, and express this as a percentage
00377   // of total file size to pass as in the inPercentWaste parameter.  A zero
00378   // likely returns always trivially true, and 100 always trivially false.
00379   // The great majority of callers are expected to use values from 25 to 75,
00380   // since most plausible thresholds for compressing might fall between the
00381   // extremes of 133% of ideal size and 400% of ideal size.  (Presumably the
00382   // larger a file gets, the more important the percentage waste involved, so
00383   // a sliding scale for compress thresholds might use smaller numbers for
00384   // much bigger file sizes.)
00385   
00386   // } ----- end commit methods -----
00387 
00388 // } ===== end nsIMdbPort methods =====
00389 
00390 // { ===== begin nsIMdbStore methods =====
00391 
00392   // { ----- begin table methods -----
00393   NS_IMETHOD NewTable( // make one new table of specific type
00394     nsIMdbEnv* ev, // context
00395     mdb_scope inRowScope,    // row scope for row ids
00396     mdb_kind inTableKind,    // the type of table to access
00397     mdb_bool inMustBeUnique, // whether store can hold only one of these
00398     const mdbOid* inOptionalMetaRowOid, // can be nil to avoid specifying
00399     nsIMdbTable** acqTable);     // acquire scoped collection of rows
00400     
00401   NS_IMETHOD NewTableWithOid( // make one new table of specific type
00402     nsIMdbEnv* ev, // context
00403     const mdbOid* inOid,   // caller assigned oid
00404     mdb_kind inTableKind,    // the type of table to access
00405     mdb_bool inMustBeUnique, // whether store can hold only one of these
00406     const mdbOid* inOptionalMetaRowOid, // can be nil to avoid specifying
00407     nsIMdbTable** acqTable);     // acquire scoped collection of rows
00408   // } ----- end table methods -----
00409 
00410   // { ----- begin row scope methods -----
00411   NS_IMETHOD RowScopeHasAssignedIds(nsIMdbEnv* ev,
00412     mdb_scope inRowScope,   // row scope for row ids
00413     mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
00414     mdb_bool* outStoreAssigned); // nonzero if store db assigned specified
00415 
00416   NS_IMETHOD SetCallerAssignedIds(nsIMdbEnv* ev,
00417     mdb_scope inRowScope,   // row scope for row ids
00418     mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
00419     mdb_bool* outStoreAssigned); // nonzero if store db assigned specified
00420 
00421   NS_IMETHOD SetStoreAssignedIds(nsIMdbEnv* ev,
00422     mdb_scope inRowScope,   // row scope for row ids
00423     mdb_bool* outCallerAssigned, // nonzero if caller assigned specified
00424     mdb_bool* outStoreAssigned); // nonzero if store db assigned specified
00425   // } ----- end row scope methods -----
00426 
00427   // { ----- begin row methods -----
00428   NS_IMETHOD NewRowWithOid(nsIMdbEnv* ev, // new row w/ caller assigned oid
00429     const mdbOid* inOid,   // caller assigned oid
00430     nsIMdbRow** acqRow); // create new row
00431 
00432   NS_IMETHOD NewRow(nsIMdbEnv* ev, // new row with db assigned oid
00433     mdb_scope inRowScope,   // row scope for row ids
00434     nsIMdbRow** acqRow); // create new row
00435   // Note this row must be added to some table or cell child before the
00436   // store is closed in order to make this row persist across sesssions.
00437   // } ----- end row methods -----
00438 
00439   // { ----- begin inport/export methods -----
00440   NS_IMETHOD ImportContent( // import content from port
00441     nsIMdbEnv* ev, // context
00442     mdb_scope inRowScope, // scope for rows (or zero for all?)
00443     nsIMdbPort* ioPort, // the port with content to add to store
00444     nsIMdbThumb** acqThumb); // acquire thumb for incremental import
00445   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00446   // then the import will be finished.
00447 
00448   NS_IMETHOD ImportFile( // import content from port
00449     nsIMdbEnv* ev, // context
00450     nsIMdbFile* ioFile, // the file with content to add to store
00451     nsIMdbThumb** acqThumb); // acquire thumb for incremental import
00452   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00453   // then the import will be finished.
00454   // } ----- end inport/export methods -----
00455 
00456   // { ----- begin hinting methods -----
00457   NS_IMETHOD
00458   ShareAtomColumnsHint( // advise re shared column content atomizing
00459     nsIMdbEnv* ev, // context
00460     mdb_scope inScopeHint, // zero, or suggested shared namespace
00461     const mdbColumnSet* inColumnSet); // cols desired tokenized together
00462 
00463   NS_IMETHOD
00464   AvoidAtomColumnsHint( // advise column with poor atomizing prospects
00465     nsIMdbEnv* ev, // context
00466     const mdbColumnSet* inColumnSet); // cols with poor atomizing prospects
00467   // } ----- end hinting methods -----
00468 
00469   // { ----- begin commit methods -----
00470   NS_IMETHOD SmallCommit( // save minor changes if convenient and uncostly
00471     nsIMdbEnv* ev); // context
00472   
00473   NS_IMETHOD LargeCommit( // save important changes if at all possible
00474     nsIMdbEnv* ev, // context
00475     nsIMdbThumb** acqThumb); // acquire thumb for incremental commit
00476   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00477   // then the commit will be finished.  Note the store is effectively write
00478   // locked until commit is finished or canceled through the thumb instance.
00479   // Until the commit is done, the store will report it has readonly status.
00480 
00481   NS_IMETHOD SessionCommit( // save all changes if large commits delayed
00482     nsIMdbEnv* ev, // context
00483     nsIMdbThumb** acqThumb); // acquire thumb for incremental commit
00484   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00485   // then the commit will be finished.  Note the store is effectively write
00486   // locked until commit is finished or canceled through the thumb instance.
00487   // Until the commit is done, the store will report it has readonly status.
00488 
00489   NS_IMETHOD
00490   CompressCommit( // commit and make db physically smaller if possible
00491     nsIMdbEnv* ev, // context
00492     nsIMdbThumb** acqThumb); // acquire thumb for incremental commit
00493   // Call nsIMdbThumb::DoMore() until done, or until the thumb is broken, and
00494   // then the commit will be finished.  Note the store is effectively write
00495   // locked until commit is finished or canceled through the thumb instance.
00496   // Until the commit is done, the store will report it has readonly status.
00497   // } ----- end commit methods -----
00498 
00499 // } ===== end nsIMdbStore methods =====
00500 };
00501  
00502 
00503 //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
00504 
00505 #endif /* _ORKINSTORE_ */