10#ifndef __BE_FILERECSTORE_H__
11#define __BE_FILERECSTORE_H__
51 const std::string &pathname,
52 const std::string &description);
69 const std::string &name,
86 const std::string &key,
87 const void *
const data,
92 const std::string &key)
96 const std::string &key)
const override;
99 const std::string &key,
100 const void *
const data,
101 const uint64_t size)
override final;
104 const std::string &key)
const override;
107 const std::string &key)
const override;
119 const std::string &key)
123 const std::string &pathname)
132 const std::string &description)
override;
141 std::unique_ptr<FileRecordStore::Impl> pimpl;
A class to represent the record store data storage mechanism implemented as files for each record.
FileRecordStore & operator=(const FileRecordStore &)=delete
std::string getDescription() const override
Obtain a textual description of the RecordStore.
void remove(const std::string &key) override
Remove a record from the store.
void sync() const override
Synchronize the entire record store to persistent storage.
FileRecordStore(const std::string &pathname, const std::string &description)
Create a new FileRecordStore, read/write mode.
void changeDescription(const std::string &description) override
Change the description of the RecordStore.
void insert(const std::string &key, const void *const data, const uint64_t size) override
Insert a record into the store.
void move(const std::string &pathname) override
Move the RecordStore.
unsigned int getCount() const override
Obtain the number of items in the RecordStore.
uint64_t getSpaceUsed() const override
Obtain real storage utilization.
void setCursorAtKey(const std::string &key) override
Set the sequence cursor to an arbitrary position within the RecordStore, starting at key.
FileRecordStore(const FileRecordStore &)=delete
Memory::uint8Array read(const std::string &key) const override
Read a complete record from a store.
void flush(const std::string &key) const override
Commit the record's data to storage.
std::string sequenceKey(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key.
uint64_t length(const std::string &key) const override
Return the length of a record.
std::string getPathname() const override
Return the path name of the RecordStore.
FileRecordStore(const std::string &name, IO::Mode mode=IO::Mode::ReadOnly)
Open an existing FileRecordStore.
RecordStore::Record sequence(int cursor=BE_RECSTORE_SEQ_NEXT) override
Sequence through a RecordStore, returning the key/data pairs.
void replace(const std::string &key, const void *const data, const uint64_t size) override final
Replace a complete record in a RecordStore.
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...