drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
resource_context.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008 Sun Microsystems, Inc.
5 * Copyright (C) 2010 Jay Pipes <[email protected]>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#pragma once
22
23#include <drizzled/common_fwd.h>
24
25namespace drizzled {
26
42class ResourceContext
43{
44public:
45 ResourceContext() :
46 monitored(NULL),
49 modified_data(false)
50 {}
51
53 void reset();
54
59 void markModifiedData();
60
65 bool hasModifiedData() const;
66
72 bool isStarted() const;
73
77 void coalesceWith(const ResourceContext *stmt_trx);
78
87
92 {
93 monitored= in_monitored;
94 }
95
104
109 {
110 trx_storage_engine= in_trx_storage_engine;
111 }
112
121
126 {
127 xa_resource_manager= in_xa_resource_manager;
128 }
129private:
147};
148
149} /* namespace drizzled */
150
void setMonitored(plugin::MonitoredInTransaction *in_monitored)
plugin::XaResourceManager * xa_resource_manager
plugin::XaResourceManager * getXaResourceManager() const
plugin::MonitoredInTransaction * getMonitored() const
void setTransactionalStorageEngine(plugin::TransactionalStorageEngine *in_trx_storage_engine)
void coalesceWith(const ResourceContext *stmt_trx)
plugin::MonitoredInTransaction * monitored
plugin::TransactionalStorageEngine * getTransactionalStorageEngine() const
void setXaResourceManager(plugin::XaResourceManager *in_xa_resource_manager)
plugin::TransactionalStorageEngine * trx_storage_engine
TODO: Rename this file - func.h is stupid.