]> git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/os/futurized_collection.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / crimson / os / futurized_collection.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #pragma once
5
6 #include <boost/intrusive_ptr.hpp>
7 #include <boost/smart_ptr/intrusive_ref_counter.hpp>
8 #include <seastar/core/future.hh>
9
10 #include "osd/osd_types.h"
11
12 namespace crimson::os {
13 class FuturizedStore;
14
15 class FuturizedCollection
16 : public boost::intrusive_ref_counter<FuturizedCollection,
17 boost::thread_unsafe_counter>
18 {
19 public:
20 FuturizedCollection(const coll_t& cid)
21 : cid{cid} {}
22 virtual ~FuturizedCollection() {}
23 virtual seastar::future<> flush() {
24 return seastar::make_ready_future<>();
25 }
26 virtual seastar::future<bool> flush_commit() {
27 return seastar::make_ready_future<bool>(true);
28 }
29 const coll_t& get_cid() const {
30 return cid;
31 }
32 private:
33 const coll_t cid;
34 };
35
36 using CollectionRef = boost::intrusive_ptr<FuturizedCollection>;
37 }