Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / journal / Future.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include "journal/Future.h"
5 #include "journal/FutureImpl.h"
6 #include "include/assert.h"
7
8 namespace journal {
9
10 void Future::flush(Context *on_safe) {
11   m_future_impl->flush(on_safe);
12 }
13
14 void Future::wait(Context *on_safe) {
15   assert(on_safe != NULL);
16   m_future_impl->wait(on_safe);
17 }
18
19 bool Future::is_complete() const {
20   return m_future_impl->is_complete();
21 }
22
23 int Future::get_return_value() const {
24   return m_future_impl->get_return_value();
25 }
26
27 void intrusive_ptr_add_ref(FutureImpl *p) {
28   p->get();
29 }
30
31 void intrusive_ptr_release(FutureImpl *p) {
32   p->put();
33 }
34
35 std::ostream &operator<<(std::ostream &os, const Future &future) {
36   return os << *future.m_future_impl.get();
37 }
38
39 } // namespace journal
40