36 #include "mongo/stdx/mutex.h" 37 #include "mongo/util/string_map.h" 41 class JournalListener;
54 std::unique_ptr<RecordStore>
getRecordStore(OperationContext* opCtx,
61 const IndexDescriptor*
desc)
override;
65 const IndexDescriptor* desc)
override;
106 int64_t
getIdentSize(OperationContext* opCtx, StringData ident)
override;
114 bool hasIdent(OperationContext* opCtx, StringData ident)
const override;
116 std::vector<std::string>
getAllIdents(OperationContext* opCtx)
const override;
119 stdx::unique_lock<stdx::mutex> lk(
_mutex);
static NoOpJournalListener instance
Definition: journal_listener.h:70
Definition: kv_engine.h:53
std::string _path
Definition: mobile_kv_engine.h:136
Collection *const const NamespaceString & ns
Definition: collection_info_cache_impl.cpp:53
Definition: collection_options.h:57
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
bool supportsDocLocking() const override
This must not change over the lifetime of the engine.
Definition: mobile_kv_engine.h:75
bool isDurable() const override
Definition: mobile_kv_engine.h:91
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
bool supportsDBLocking() const override
This must not change over the lifetime of the engine.
Definition: mobile_kv_engine.h:79
bool supportsDirectoryPerDB() const override
Returns true if storage engine supports –directoryperdb.
Definition: mobile_kv_engine.h:87
void setJournalListener(JournalListener *jl) override
Sets a new JournalListener, which is used to alert the rest of the system about journaled write progr...
Definition: mobile_kv_engine.h:118
std::unique_ptr< MobileSessionPool > _sessionPool
Definition: mobile_kv_engine.h:131
std::vector< std::string > getAllIdents(OperationContext *opCtx) const override
Definition: mobile_kv_engine.cpp:221
Status dropIdent(OperationContext *opCtx, StringData ident) override
Definition: mobile_kv_engine.cpp:162
Status createRecordStore(OperationContext *opCtx, StringData ns, StringData ident, const CollectionOptions &options) override
The create and drop methods on KVEngine are not transactional.
Definition: mobile_kv_engine.cpp:124
This class allows for the storageEngine to alert the rest of the system about journaled write progres...
Definition: journal_listener.h:48
JournalListener * _journalListener
Definition: mobile_kv_engine.h:134
Status repairIdent(OperationContext *opCtx, StringData ident) override
Definition: mobile_kv_engine.h:108
A RecoveryUnit is responsible for ensuring that data is persisted.
Definition: recovery_unit.h:51
int flushAllFiles(OperationContext *opCtx, bool sync) override
Flush is a no-op since SQLite transactions are durable by default after each commit.
Definition: mobile_kv_engine.h:98
int64_t getIdentSize(OperationContext *opCtx, StringData ident) override
Note: this counts the total number of bytes in the key and value columns, not the actual number of by...
Definition: mobile_kv_engine.cpp:182
Status beginBackup(OperationContext *opCtx) override
See StorageEngine::beginBackup for details.
Definition: mobile_kv_engine.h:67
bool supportsCappedCollections() const override
This must not change over the lifetime of the engine.
Definition: mobile_kv_engine.h:83
void endBackup(OperationContext *opCtx) override
See StorageEngine::endBackup for details.
Definition: mobile_kv_engine.h:71
OperationContext Database StringData BSONObj options
Definition: database_impl.cpp:949
bool isEphemeral() const override
Returns true if the KVEngine is ephemeral – that is, it is NOT persistent and all data is lost after...
Definition: mobile_kv_engine.h:102
SortedDataInterface * getSortedDataInterface(OperationContext *opCtx, StringData ident, const IndexDescriptor *desc) override
Definition: mobile_kv_engine.cpp:153
MobileKVEngine(const std::string &path)
Definition: mobile_kv_engine.cpp:57
virtual Timestamp getAllCommittedTimestamp() const override
See StorageEngine::getAllCommittedTimestamp
Definition: mobile_kv_engine.h:123
RecoveryUnit * newRecoveryUnit() override
Definition: mobile_kv_engine.cpp:120
std::unique_ptr< RecordStore > getRecordStore(OperationContext *opCtx, StringData ns, StringData ident, const CollectionOptions &options) override
Having multiple out for the same ns is a rules violation; Calling on a non-created ident is invalid a...
Definition: mobile_kv_engine.cpp:140
void cleanShutdown() override
This method will be called before there is a clean shutdown.
Definition: mobile_kv_engine.h:112
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Status createSortedDataInterface(OperationContext *opCtx, StringData ident, const IndexDescriptor *desc) override
Definition: mobile_kv_engine.cpp:147
Definition: mobile_kv_engine.h:43
OperationContext const IndexDescriptor * desc
Definition: index_catalog_impl.cpp:97
bool hasIdent(OperationContext *opCtx, StringData ident) const override
Definition: mobile_kv_engine.cpp:205
stdx::mutex _mutex
Definition: mobile_kv_engine.h:128
void _initDBPath(const std::string &path)
Definition: mobile_kv_engine.cpp:85
This interface is a work in progress.
Definition: sorted_data_interface.h:64