2009-01-31 23:27:25 +01:00
|
|
|
// reci.h
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "storage.h"
|
|
|
|
|
|
|
|
namespace mongo {
|
|
|
|
|
2009-02-05 22:17:46 +01:00
|
|
|
/* Subclass this and implement your real storage interface.
|
|
|
|
Currently we just use a single storage interface at compile time. Later if desired to be runtime
|
|
|
|
configurable we will make these pure virtual functions / nonstatic.
|
|
|
|
*/
|
2009-01-31 23:27:25 +01:00
|
|
|
class RecStoreInterface {
|
|
|
|
public:
|
|
|
|
static char* get(DiskLoc d, unsigned len) { assert(false); return 0; }
|
|
|
|
|
2009-03-13 16:56:28 +01:00
|
|
|
/* indicate that the diskloc specified has been updated. note that as-is today, the modification may come AFTER this
|
|
|
|
call -- we handle that currently.
|
|
|
|
*/
|
2009-02-03 00:18:22 +01:00
|
|
|
static void modified(DiskLoc d) { assert(false); }
|
|
|
|
|
2009-01-31 23:27:25 +01:00
|
|
|
/* insert specified data as a record */
|
|
|
|
static DiskLoc insert(const char *ns, const void *obuf, int len, bool god) { assert(false); return DiskLoc(); }
|
|
|
|
|
2009-03-17 22:02:21 +01:00
|
|
|
/* drop the collection */
|
|
|
|
static void drop(const char *ns) { assert(false); }
|
2009-01-31 23:27:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|