175 void open(
const std::string& path);
179 bool write(
const std::string& url,
const std::string& ser_type,
SchemaType schema_type,
ActionType action_type,
180 const Bytes& data, int64_t microseconds_timestamp);
182 bool write_filex(
bool complete =
true);
188 bool rollback_cache();
192 bool load_schema(
const std::string& ser_type,
SchemaType& schema_type,
SchemaData& schema_data);
194 bool insert_schema(
const SchemaData& schema_data);
197 std::unique_ptr<Impl> impl_;
Abstract VLink bag recorder with split, compression, schema embedding and a global hook.
Asynchronous VLink message recorder built on top of MessageLoop.
Definition: bag_writer.h:140
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:134
Concrete SQLite-backed BagWriter implementation with WAL caching and batch commits.
Definition: vdb_writer.h:103
int get_split_index() const override
Returns the index of the split part currently being written.
bool is_dumping() const override
Returns the current value of the internal dumping flag.
size_t get_max_task_count() const override
Returns the maximum queue depth.
void register_schema_callback(SchemaCallback &&callback) override
Registers a resolver that maps a serialisation-type string to SchemaData.
void register_split_callback(SplitCallback &&callback, bool before) override
Registers a callback invoked at each file-split boundary.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
void on_end() override
Hook invoked once on the loop thread after the last task runs.
~VDBWriter() override
Commits any cached writes and closes the SQLite database.
int64_t record(const Frame &frame, bool immediate) override
int64_t get_record_timestamp() const override
bool push_schema(const SchemaData &schema_data, bool immediate=false) override
Embeds schema_data in the schemas table for offline introspection.
bool is_split_mode() const override
Reports whether split-file recording is active.
VDBWriter(const std::string &path, const Config &config={})
Opens or creates a SQLite bag file for recording.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:207
ActionType
Labels for messages captured by the recording infrastructure.
Definition: types.h:185
Recording behaviour, split policy and resource budgets.
Definition: bag_writer.h:168
One recorded or replayed message as it flows through the bag pipeline.
Definition: types.h:230
Wire-format-neutral wrapper around one serialised schema blob.
Definition: types.h:301