]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/db/write_callback.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 #include "rocksdb/status.h"
10 namespace ROCKSDB_NAMESPACE
{
16 virtual ~WriteCallback() {}
18 // Will be called while on the write thread before the write executes. If
19 // this function returns a non-OK status, the write will be aborted and this
20 // status will be returned to the caller of DB::Write().
21 virtual Status
Callback(DB
* db
) = 0;
23 // return true if writes with this callback can be batched with other writes
24 virtual bool AllowWriteBatching() = 0;
27 } // namespace ROCKSDB_NAMESPACE