]> git.proxmox.com Git - ceph.git/blob - ceph/src/mds/BatchOp.h
bc4e21bcea9591a2fba1433062b604c5f350093a
[ceph.git] / ceph / src / mds / BatchOp.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2012 Red Hat
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15
16 #ifndef MDS_BATCHOP_H
17 #define MDS_BATCHOP_H
18
19 #include "common/ref.h"
20
21 #include "mdstypes.h"
22
23 class BatchOp {
24 public:
25 virtual ~BatchOp() {}
26
27 virtual void add_request(const ceph::ref_t<class MDRequestImpl>& mdr) = 0;
28 virtual ceph::ref_t<class MDRequestImpl> find_new_head() = 0;
29
30 virtual void print(std::ostream&) = 0;
31
32 void forward(mds_rank_t target);
33 void respond(int r);
34
35 protected:
36 virtual void _forward(mds_rank_t) = 0;
37 virtual void _respond(mds_rank_t) = 0;
38 };
39
40 #endif