|
|
@ -1,5 +1,6 @@ |
|
|
|
#include <deque> |
|
|
|
#include <string> |
|
|
|
#include "leveldb/db.h" |
|
|
|
#include "leveldb/slice.h" |
|
|
|
#include "leveldb/status.h" |
|
|
|
#include "leveldb/write_batch.h" |
|
|
@ -164,6 +165,25 @@ public: |
|
|
|
// std::deque<FieldArray> fa_buf; |
|
|
|
}; |
|
|
|
|
|
|
|
class SnapshotReq; |
|
|
|
|
|
|
|
class XSnapshot { |
|
|
|
friend class SnapshotReq; |
|
|
|
public: |
|
|
|
XSnapshot(const Snapshot *kv,const Snapshot *index) |
|
|
|
: kv_snapshot(kv), index_snapshot(index) {} |
|
|
|
|
|
|
|
const leveldb::Snapshot *kv_snapshot; |
|
|
|
const leveldb::Snapshot *index_snapshot; |
|
|
|
}; |
|
|
|
|
|
|
|
class SnapshotReq : public Request { |
|
|
|
public: |
|
|
|
SnapshotReq(port::Mutex *mu):Request(iCreateReq_t, mu) { }; |
|
|
|
void Prepare(FieldDB *DB); |
|
|
|
XSnapshot *xSnapshot; |
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif |