10#ifndef __BE_DBRECSTORE_H__
11#define __BE_DBRECSTORE_H__
46 const std::string &pathname,
47 const std::string &description);
64 const std::string &pathname,
85 const std::string &key)
const override;
88 const std::string &key,
89 const void *
const data,
94 const std::string &key)
98 const std::string &key)
const override;
101 const std::string &key)
const override;
113 const std::string &key)
117 const std::string &pathname)
126 const std::string &description)
override;
134 std::unique_ptr<DBRecordStore::Impl> pimpl;
A class that implements IO::RecordStore using a Berkeley DB database as the underlying record storage...
std::string sequenceKey(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key.
void remove(const std::string &key) override
Remove a record from the store.
void move(const std::string &pathname) override
Move the RecordStore.
std::string getDescription() const override
Obtain a textual description of the RecordStore.
unsigned int getCount() const override
Obtain the number of items in the RecordStore.
uint64_t getSpaceUsed() const override
Obtain real storage utilization.
RecordStore::Record sequence(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key/data pairs.
uint64_t length(const std::string &key) const override
Return the length of a record.
void changeDescription(const std::string &description) override
Change the description of the RecordStore.
DBRecordStore(const DBRecordStore &)=delete
Memory::uint8Array read(const std::string &key) const override
Read a complete record from a store.
void setCursorAtKey(const std::string &key) override
Set the sequence cursor to an arbitrary position within the RecordStore, starting at key.
DBRecordStore & operator=(const DBRecordStore &)=delete
void sync() const override
Synchronize the entire record store to persistent storage.
void flush(const std::string &key) const override
Commit the record's data to storage.
DBRecordStore(const std::string &pathname, const std::string &description)
Create a new DBRecordStore, read/write mode.
std::string getPathname() const override
Return the path name of the RecordStore.
void insert(const std::string &key, const void *const data, const uint64_t size) override
Insert a record into the store.
DBRecordStore(const std::string &pathname, IO::Mode mode=IO::Mode::ReadOnly)
Open an existing DBRecordStore.
A class to represent a data storage mechanism.
virtual void insert(const std::string &key, const Memory::uint8Array &data)
Insert a record into the store.
static const int BE_RECSTORE_SEQ_NEXT
Tell sequence to sequence from current position.
virtual void replace(const std::string &key, const Memory::uint8Array &data)
Replace a complete record in a RecordStore.
Mode
Accessibility of object.
@ ReadOnly
Constant indicating the state of an object that manages some underlying file is accessible for readin...
This software was developed at the National Institute of Standards and Technology (NIST) by employees...